Question

I have an .xls file that I am allowing a user to make changes to by entering values in TextBoxs within a GridView. In the excel file, there is a column (D) that does a basic (=C4-B4) function. The user is allowed to edit both the B and C columns, but not the one containing the function (D).
I am using OleDbCommands to make changes to the .xls file, and that works fine. However, column D is not being updated. I have to physically open the excel file, then save it for the function column to be properly updated.
What would be the easiest way to make sure the function is "run" and saved when changes to the source columns are made?

Edit
Well, merely hiding the modalpopupextender that it is in saves the file. But I still have the problem of column D not being updated client-side. I assume that's something I'll have to do myself?

Was it helpful?

Solution 2

Since when the .xls file is "released" by my page it gets saved anyways (updating the column D function cells) I just update that column client-side so the user can see the difference, and don't bother using OleDB to update that column.

OTHER TIPS

OleDb only can read/write Excel. The Excel Calculation engine is available through automation and can be used to update the formula, but I have never seen a method through OleDb. OleDb does not provide access to the functionality of Excel, only the formatting of it's data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top