Skip to content

Commit

Permalink
fixed bug where select all and save to excel would show only one row (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Bist authored and kburtram committed Aug 30, 2018
1 parent cf515af commit efd470b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/sql/parts/query/common/resultSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ export class ResultSerializer {
// prompt for filepath
return self.promptForFilepath(saveRequest).then(filePath => {
if (filePath) {
return self.sendRequestToService(filePath, saveRequest.batchIndex, saveRequest.resultSetNumber, saveRequest.format, saveRequest.selection ? saveRequest.selection[0] : undefined);
let selection: Slick.Range = undefined;
if (saveRequest.selection) {
let fromSelection = saveRequest.selection[0];
let toSelection = saveRequest.selection[saveRequest.selection.length - 1];
selection = new Slick.Range(fromSelection.fromRow, fromSelection.fromCell, toSelection.toRow, toSelection.toCell);
}
return self.sendRequestToService(filePath, saveRequest.batchIndex, saveRequest.resultSetNumber, saveRequest.format, selection);
}
return Promise.resolve(undefined);
});
Expand Down

0 comments on commit efd470b

Please # to comment.