Posted 8 September 2017, 1:31 pm EST
I have a grid, where I have the last col as a total col, I do this with the command below.
The problem is that I want that for all rows (could be 100's) but for the last 2 rows which are added to the grid with .rowcount += 7 (seven non bound rows added, only the last two are not to be total cols) the rest of the grid is bound to a dataset.
I am unable to set the cells value for those last two rows as they are working as formula.
How can I either remove the formula, just for those last two rows(leaving it in place for all other rows) or somehow set the value of those cells to a value I want to have.
FpSpread1.ActiveSheet.Columns(FpSpread1.ActiveSheet.ColumnCount - 1).Formula ="SUM(e1:" & FpSpread1.ActiveSheet.GetColumnAutoText(FpSpread1.ActiveSheet.ColumnCount - 2) & "1)"