Last post Aug 09, 2011 09:42 PM by Decker Dong - MSFT
Aug 06, 2011 12:46 PM|vishal_asp.net|LINK
Writing Function in some specific cell of an excel file
I want to implement the calculation logic of excel at C#.NET and transfer the function to specific cell in excel (that is the mode of writing function will be as we do in Ms Excel. Example, if we use summation for range function then the formula we can design
in C#.NET but will actually sent to worksheets cell).
Aug 06, 2011 02:39 PM|march11|LINK
Just figureout how to create the formula in a cell of a gridview for example then export to an excel spreadsheet. There are many web links showing how to export an aspx page to Excel. Once you have the formula in the Gridview it will export to Excel.
Aug 09, 2011 09:42 PM|Decker Dong - MSFT|LINK
No matter which datatbase your are referring, plz use XXXDataAdapter.Fill to create a memory-based DataTable, and export to the Excel sheet.
For calculation, you can use something looking like "DataTable.Compute(……))" Or just use DataTable.Columns[indedx].Expression="Column1+Column2";……
PS： If you are using WinForm, I'd like to recommand you directly use Office Tool's programming：http://social.msdn.microsoft.com/Forums/en-US/exceldev/threads