Reputation: 13437
I want to open an Excel file and update specific cells in specific sheet.For example update cell A1
in Book1
and update B3
in Book2
and ...
What is prefered way to do this in 64 bit windows?
Currently I do this with OWC11
and change IIS 7
and set Enable 32-bit Applications
to true
.And It works Fine. For some reason I can't set Enable 32-bit Applications
to true
and when change it to False
my program does not work
thanks
Upvotes: 0
Views: 2889
Reputation: 21475
You can install 64bit version of Excel and use 64bit versions of the COM libraries. Just remember that you can reference just one of them (either 32bit or 64bit) at a time unless you want to do some extra magic in your code like dynamically loading references.
Upvotes: 0
Reputation: 70369
Office Interop is NOT supported in sever-scenarios (like using Excel from ASP.NET/IIS) by MS.
There are many options to read/edit/create Excel files without Interop/installing Excel on the server:
MS provides the free OpenXML SDK V 2.0 - see http://msdn.microsoft.com/en-us/library/bb448854%28office.14%29.aspx (XLSX only)
This can read+write all MS Office files (including Excel).
Another free option see http://www.codeproject.com/KB/office/OpenXML.aspx (XLSX only)
IF you need more like handling older Excel versions (like XLS, not only XLSX), rendering, creating PDFs, formulas etc. then there are different free and commercial libraries like ClosedXML (free, XLSX only), EPPlus (free, XLSX only), Aspose.Cells, SpreadsheetGear, LibXL and Flexcel etc.
Upvotes: 2