Hello
I have an Excel file which I load into an Infragistics.Excel.Workbook object. In this Excel file, I have a cell where I put a value, and another one which calculates something from the first one. In my code, I want to retrieve the resulting value from this second cell, but all I can get is the formula itself.How do I tell the Infragistics.Excel engine to give me the value, not the formula?ThanksGuy
The ability to solve formulas is not currently supported in the Excel assembly. I would recommend submitting a feature request for this to the support group: http://devcenter.infragistics.com/Protected/RequestFeature.aspx. I have seen other people request this and the number of requests for a certain feature does play a part in what gets implemented in future releases.
Wow... I don't see how the Infragistics.Excel engine can be useful without the ability to get calculated values out of the worksheet!!!!
What do you use it for?!?
Isn't there a way I could do it? I find this hard to believe...
Hi Siglr,
The idea behind the Excel engine is to allow people to move data between Excel and the WinGrid. When we added the basic Export feature a couple of years ago, there was huge customer demand just to get the grid data into Excel so end users could mess around with it. Excel is a very usedful reporting tool. We added the ability to load Excel files into Workbook objects last year based on customer feedback that in certain cases they wanted to move data back into a WinGrid and persist it back to their data store.
When Exporting data to Excel, you can preserve the formula information from an UltraCalcManager that is bound to a WinGrid, as well as images and other formatting using the Infragistics.Excel engine. Since Excel is Cell based, you assign formulas on individual cells, when we export, since we have a clean Worksheet, we can assign the formulas correctly. But since the WinGrid is Column based, formulas are based on the entire column, not the cell. So we cannot gurantee that a formula would make any sense when brought back into the WinGrid from Excel.
I did get the email you sent to the productmanager address and I will make sure your feature request gets into the system.
Thanks
Jason
By the way... if you want to do Excel-like calculations and formulas in your application, then you might be looking for the UltraCalcManager component.