Read excel file

carpe2

Freshman
Joined
Jan 16, 2004
Messages
42
Location
Spain
Hi,
I would like to read an excel file, the problem is that MS excel is not going to be installed in the server where my program in C# is going to run. Can I read the excel file? If not, which would be the minimum requirements to install? I would like to avoid installing MS Office Excel in the server.

Any help would be appreciated.
Thanks in advance.
 
Without Excel installed, you will not be able to read Excel files using the Microsoft Excel COM objects. Open Office and the like have support for reading Excel so there is a spec and there are libraries (might not be .Net) out there so I'd search for third party/open source Excel libraries.

Another option might be to save the files in a format other than *.xsl. Both XML and CSV are much easier to deal with and are both supported by Excel. It might not be feasible, but maybe you can take Excel out of the equation.
 
As mskeel stated, XML or a comma separated file may be the only option if you cannot install Excel on the server. XML is 'the way' in .NET. The System.Xml namespace provides vast functionality to process XML data.

In Excel, the "Data >> XML >> Export" menu option may be worth looking into. I have never personally used it, but I've noticed it there.
 
Back
Top