开发者

How to AutoSum in Excel using VB.Net

Via VB.Net, is there any way to开发者_StackOverflow中文版 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜