Reputation: 20644
I am using Microsoft.Office.Interop.Excel to read an excel file and change some cells. It works perfectly with xls files.
I would like to know that, if I deploy the application to the client. They have to install the whole Microsoft Office application? as I think the only dll will not work, right?
Thanks in advance.
Upvotes: 0
Views: 1749
Reputation: 12703
In case were Open XML and Excel interop is not an option, I would recommend Aspose. They have a nice suit of Office compatible components, including for Excel. And they are built for the server. We are using them since 5 years and it works pretty well.
Upvotes: 0
Reputation: 150253
Yes, the clients must have Office installed.
I must add a warning, Interop is awkward you better use other (open source) libraries like NPOI or EPPlus for .xlsx- 2007 excel sheets for automation.
Update:
Additional to the awkward of interop, It's unsafe when using in servers!!! see here:
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."
Upvotes: 5
Reputation: 12703
If you know there are only .xslx files, you don't need Excel if you use the Open XML Api from Microsoft. It can read Excel files perfectly.
Upvotes: 0