Kranarna
asked on
Read an excel file 2003 and later without having Excel installed
How can i read a excel file 2003 or later without having excel installed on my computer.
I have first used Microsoft.Office.Interop.E xcel.dll and it work fine on my computer. Then when i moved the webapp to the server I got the message:
Excel ERROR: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-0 0000000004 6} failed due to the following error: 80040154.
I google for this and found the answer that to use Microsoft.Office.Interop.E xcel.dll you must have Excel installed on your computer. That is not an option for me so is there any other way to do this?
I have first used Microsoft.Office.Interop.E
Excel ERROR: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-0
I google for this and found the answer that to use Microsoft.Office.Interop.E
ASKER
For excel 2003 and later? Because before I used this
Provider=Microsoft.Jet.OLE DB.4.0;Dat a Source=" + pPath & filnamn + ";" + "Extended Properties=""Excel 8.0;HDR=NO;"
But with the new excel format it doesnt work anymore. Is the a new version of OLEDB ?
Provider=Microsoft.Jet.OLE
But with the new excel format it doesnt work anymore. Is the a new version of OLEDB ?
What do you mean it doesn't work anymore?
Bob
Bob
ASKER
I get this errormessage
Microsoft JET Database Engine error '80004005'
External table is not in the expected format.
And that is because the excelfile is in a "new" format. That is at least what I have figured out by serching for this error.
Microsoft JET Database Engine error '80004005'
External table is not in the expected format.
And that is because the excelfile is in a "new" format. That is at least what I have figured out by serching for this error.
Are you talking about Excel 2007?
Bob
Bob
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Ok, I got beaten to the punch (gotta love it!!)
Bob
Bob
ASKER
vbturbo>I tried something similar to that before but maybe got something wrong because it didnt work then but I will try it on monday when I get back to work. So I will come back then.
TheLearnedOne> :)
TheLearnedOne> :)
ASKER
Sorry for my late answer. I found another way to do this, but http://www.connectionstrings.com/?carrier=excel2007 that will surely work also. Thank you
Bob