Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fix excel download if only one record
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldevgarg committed Sep 7, 2023
1 parent b10d032 commit ea0aecf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/mgramseva/lib/providers/reports_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ class ReportsProvider with ChangeNotifier {
.setText(headers[CommonMethods.getAlphabetsWithKeyValue()[i].key]);
}

for (int i = dataStartRow; i < tableData.length + 2; i++) {
for (int i = dataStartRow; i < tableData.length + dataStartRow; i++) {
for (int j = 0; j < headers.length; j++) {
sheet
.getRangeByName(
'${CommonMethods.getAlphabetsWithKeyValue()[j].label}$i')
.setText(tableData[i - 2][j]);
.setText(tableData[i - dataStartRow][j]);
sheet
.getRangeByName(
'${CommonMethods.getAlphabetsWithKeyValue()[j].label}$i')
Expand Down

0 comments on commit ea0aecf

Please sign in to comment.