tags:

views:

8

answers:

1

Via VB.Net, is there any way to access the AutoSum feature that Excel has? I have a spreadsheet that I create and populate via a datatable using my application. I know how to sum based upon a predefined range (e.g., .cells(cnt + 1, 21).Formula = "=Sum(U3:U" & cnt & ")") but is there any way that I can just call a cell in my worksheet and have it AutoSum as if I was clicking the AutoSum button in Excel for that row? This would save me a lot of coding time based upon the logic my spreadsheet is going to need. Thanks for any help.

A: 

So are you trying to put the result of the sum of the complete row in the cells? Or do you want to put the formula "autosum" on the excel?

Either way you can do it by selecting that particular cell and then typing in the corresponding command on the value or formula field of that cell.

Jeivier