Click here to Skip to main content
15,917,329 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am reading .xlsm file in my application and perform some operation and saved it into database. When I am using file which is saved from excel 2007 it's working fine but whenever I used excel file which is saved from version greater than 2007 its throwing exception. Please suggest what can I do to resolve this issue ?

What I have tried:

Nothing...
Posted
Updated 23-Oct-18 21:10pm
v2
Comments
Maciej Los 24-Oct-18 2:02am    
What's your code? Note, that we can NOT read in your mind or direct from your screen.
Richard Deeming 25-Oct-18 14:16pm    
"... its throwing exception"

And you didn't think we'd need to know the details of the exception, or see the code that causes it?

1 solution

I'd suggest to use ADO.NET[^] + OLEDB provider[^] then you'll be able to connect to MS Excel file, fetch data into DataTable[^] object and finally dump it into database.

For further details, please see:
Microsoft ACE OLEDB 12.0 Connection Strings - ConnectionStrings.com[^]
Accessing Microsoft Office Data from .NET Applications[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900