We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Desktop Grid - Formula Calculation by Columns (Not cell by cell)


Can we set formula for columns?

e.g. To set column C as sum of column A and column B values of corresponding rows?


sheet.Columns(“C”).SetCellValue("=A + B")

Is it possible to perform such an operation?


Well, you need to loop through the cells in a column range and specify the formula string accordingly for your requirements:


Dim sheet As Aspose.Grid.Desktop.Worksheet = Me.grdDataEntry.Worksheets(0)
Dim cell As Aspose.Grid.Desktop.GridCell
Dim i As Integer
For i = 0 To 10
cell = sheet.Cells(i, 0)
cell.SetCellValue("your formula goes here")


Thank you.