@@ -164,12 +164,12 @@ private void WriteSalesData(IXLWorksheet sheet, Info info, List<Sales> sales)
164
164
}
165
165
166
166
sheet . Cell ( $ "A{ row + 2 } ") . Value = "Grand Total :" ;
167
- sheet . Cell ( $ "F{ row + 2 } ") . FormulaA1 = $ "=SUM(F15:F{ row } )";
168
- sheet . Cell ( $ "G{ row + 2 } ") . FormulaA1 = $ "=SUM(G15:G{ row } )";
169
- sheet . Cell ( $ "H{ row + 2 } ") . FormulaA1 = $ "=SUM(H15:H{ row } )";
170
- sheet . Cell ( $ "I{ row + 2 } ") . FormulaA1 = $ "=SUM(I15:I{ row } )";
171
- sheet . Cell ( $ "J{ row + 2 } ") . FormulaA1 = $ "=SUM(J15:J{ row } )";
172
- sheet . Cell ( $ "K{ row + 2 } ") . FormulaA1 = $ "=SUM(K15:K{ row } )";
167
+ sheet . Cell ( $ "F{ row + 2 } ") . FormulaA1 = $ "=SUM(F15:F{ row - 1 } )";
168
+ sheet . Cell ( $ "G{ row + 2 } ") . FormulaA1 = $ "=SUM(G15:G{ row - 1 } )";
169
+ sheet . Cell ( $ "H{ row + 2 } ") . FormulaA1 = $ "=SUM(H15:H{ row - 1 } )";
170
+ sheet . Cell ( $ "I{ row + 2 } ") . FormulaA1 = $ "=SUM(I15:I{ row - 1 } )";
171
+ sheet . Cell ( $ "J{ row + 2 } ") . FormulaA1 = $ "=SUM(J15:J{ row - 1 } )";
172
+ sheet . Cell ( $ "K{ row + 2 } ") . FormulaA1 = $ "=SUM(K15:K{ row - 1 } )";
173
173
174
174
sheet . Cells ( $ "F{ row + 2 } :K{ row + 2 } ") . Style . Font . Bold = true ;
175
175
sheet . Cells ( $ "F{ row + 2 } :K{ row + 2 } ") . Style . NumberFormat . Format = "###,###,###,##0.00" ;
@@ -270,15 +270,15 @@ private void WritePurchasesData(IXLWorksheet sheet, Info info, List<Purchases> p
270
270
}
271
271
272
272
sheet . Cell ( $ "A{ row + 2 } ") . Value = "Grand Total :" ;
273
- sheet . Cell ( $ "F{ row + 2 } ") . FormulaA1 = $ "=SUM(F15:F{ row } )";
274
- sheet . Cell ( $ "G{ row + 2 } ") . FormulaA1 = $ "=SUM(G15:G{ row } )";
275
- sheet . Cell ( $ "H{ row + 2 } ") . FormulaA1 = $ "=SUM(H15:H{ row } )";
276
- sheet . Cell ( $ "I{ row + 2 } ") . FormulaA1 = $ "=SUM(I15:I{ row } )";
277
- sheet . Cell ( $ "J{ row + 2 } ") . FormulaA1 = $ "=SUM(J15:J{ row } )";
278
- sheet . Cell ( $ "K{ row + 2 } ") . FormulaA1 = $ "=SUM(K15:K{ row } )";
279
- sheet . Cell ( $ "L{ row + 2 } ") . FormulaA1 = $ "=SUM(L15:L{ row } )";
280
- sheet . Cell ( $ "M{ row + 2 } ") . FormulaA1 = $ "=SUM(M15:M{ row } )";
281
- sheet . Cell ( $ "N{ row + 2 } ") . FormulaA1 = $ "=SUM(N15:N{ row } )";
273
+ sheet . Cell ( $ "F{ row + 2 } ") . FormulaA1 = $ "=SUM(F15:F{ row - 1 } )";
274
+ sheet . Cell ( $ "G{ row + 2 } ") . FormulaA1 = $ "=SUM(G15:G{ row - 1 } )";
275
+ sheet . Cell ( $ "H{ row + 2 } ") . FormulaA1 = $ "=SUM(H15:H{ row - 1 } )";
276
+ sheet . Cell ( $ "I{ row + 2 } ") . FormulaA1 = $ "=SUM(I15:I{ row - 1 } )";
277
+ sheet . Cell ( $ "J{ row + 2 } ") . FormulaA1 = $ "=SUM(J15:J{ row - 1 } )";
278
+ sheet . Cell ( $ "K{ row + 2 } ") . FormulaA1 = $ "=SUM(K15:K{ row - 1 } )";
279
+ sheet . Cell ( $ "L{ row + 2 } ") . FormulaA1 = $ "=SUM(L15:L{ row - 1 } )";
280
+ sheet . Cell ( $ "M{ row + 2 } ") . FormulaA1 = $ "=SUM(M15:M{ row - 1 } )";
281
+ sheet . Cell ( $ "N{ row + 2 } ") . FormulaA1 = $ "=SUM(N15:N{ row - 1 } )";
282
282
283
283
sheet . Cells ( $ "F{ row + 2 } :N{ row + 2 } ") . Style . Font . Bold = true ;
284
284
sheet . Cells ( $ "F{ row + 2 } :N{ row + 2 } ") . Style . NumberFormat . Format = "###,###,###,##0.00" ;
0 commit comments