Search code examples
.netasp.netexceloledboledbcommand

How to save .xls changes from Excel Function after updating/modifying it using OleDbCommands?


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?


Solution

  • 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.