Skip to content

Commit

Permalink
fix(core/reports): fix xlsreport errors row number
Browse files Browse the repository at this point in the history
  • Loading branch information
robzan8 committed Mar 16, 2023
1 parent fe3e277 commit 97bbdd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/core/reports/src/xls-report/xls-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function xlsReport(file: string, http: HttpClient): Observable<AjfReport>
try {
js = indicatorToJs(elem.value);
} catch (err: any) {
const r = elem.__rowNum__;
const r = Number(elem.__rowNum__) + 1;
err = new Error(`Error in variable "${elem.name}" (row ${r}): ${err.message}`);
window.alert(err.message);
throw err;
Expand Down Expand Up @@ -291,7 +291,7 @@ function _buildGraph(name: string, json: {[key: string]: string}[]): AjfWidget {
try {
js = indicatorToJs(row[rowKey]);
} catch (err: any) {
const rowNum = row['__rowNum__'];
const rowNum = Number(row['__rowNum__']) + 1;
err = new Error(
`Error in "${name}", row ${rowNum}, column "${rowKey}": ${err.message}`,
);
Expand Down Expand Up @@ -401,7 +401,7 @@ function _buildTable(
try {
elem = indicatorToJs(elem as string);
} catch (err: any) {
const rowNum = row['__rowNum__'];
const rowNum = Number(row['__rowNum__']) + 1;
err = new Error(
`Error in "${sheetName}", row ${rowNum}, column "${title}": ${err.message}`,
);
Expand Down

0 comments on commit 97bbdd4

Please sign in to comment.