Can I read / open Excel 2003 file which has extension .xls

Aug 4, 2011 at 3:05 PM

Hi,

 

Can I read / open Excel 2003 file which has extension .xls

 

If so then please let me know how ?

Because as of now I am getting an error while opening .xls files

 

I am looking for any ideas or any alternatives on the same.

Editor
Aug 4, 2011 at 3:36 PM

No, EPPlus only works with OOXML ( .xlsx ). If you want to read older excel files, you can try NPOI project.

http://npoi.codeplex.com/

Aug 4, 2011 at 4:34 PM

There's a microsoft tool called ofc that can convert xls to xlsx.  I use this quite a lot as the BI tools my company use still can't output xlsx format.

Aug 4, 2011 at 5:52 PM
mjslane wrote:

There's a microsoft tool called ofc that can convert xls to xlsx.  I use this quite a lot as the BI tools my company use still can't output xlsx format.

Can this conversion be pro-grammatically achieved ?

If so, then can please suggest me a link of such example or so, it can be quite helpful for me.

Thanks a lot!!

Aug 4, 2011 at 5:55 PM
mrxrsd wrote:

No, EPPlus only works with OOXML ( .xlsx ). If you want to read older excel files, you can try NPOI project.

http://npoi.codeplex.com/

In my case users can upload Excel 2003 or 2007 files, & EPPlus very well handles 2007 files. What do you suggest for handling Excel 2003 .xls files ??

Do I need add NPOI project as well ( its like adding another third party )

Or can you suggest me only I tool that takes care of both .

Looking forward for your advice.

 

Thanks !

Aug 5, 2011 at 11:49 AM

It depends on what you are trying to do.  If it's a simple data load, the Excel Jet drivers would probably be your best bet. 

Information on OFC here.  You have to build an ini file and then run ofc against it using the Process classes.  It has a habit of return success when it has actually failed. so check the output file is there afterwards.  It usually works on the next try or two.

http://technet.microsoft.com/en-us/library/cc179019(office.12).aspx

Aug 5, 2011 at 6:35 PM
Edited Aug 5, 2011 at 6:37 PM
mjslane wrote:

It depends on what you are trying to do.  If it's a simple data load, the Excel Jet drivers would probably be your best bet. 

Information on OFC here.  You have to build an ini file and then run ofc against it using the Process classes.  It has a habit of return success when it has actually failed. so check the output file is there afterwards.  It usually works on the next try or two.

http://technet.microsoft.com/en-us/library/cc179019(office.12).aspx


No My application has to read & update Excel Files based on some logic & also may carry out some other processes like database,etc.

This is a simple web Application in which user can upload Excel 2003 - 2010 files & would be read / updated based on some logic.

I am able to handle 2007 - 2010 files with  EPPlus, problem comes for 2003 / 2005 excel files.

Any ideas ??

Thanks !!