0

I am writing an application where we need to update an existing Excel sheet through our system. I was able to do so on my local machine with OleDbConnection but when i deploy the application on server it gives me "operation must use an updateable query" error on Windows server 2012. I know its not recommended to install MS Office on Server and thats why its causing the issue. Any one has an idea whast the work around for this problem.

Do i have to give permission to my .net application so it can update the excel file or its something else?

Thanks in Advance.

arpan shah
  • 277
  • 2
  • 18

1 Answers1

0

I know its not recommended to install MS Office on Server

Last I checked, it is also a violation of the license terms (though that may have changed)

As you note, there are many reasons it is unwise to deploy Office to a server environment.

If you are using the newer (2007+) .xlsx file format exclusively, you can use the open source EPPlus library for most common Excel tasks. It is free, straightforward to use, and is designed to work on a server.

EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx).

Eric J.
  • 147,927
  • 63
  • 340
  • 553