Click here to Skip to main content
15,908,173 members
Please Sign up or sign in to vote.
4.33/5 (2 votes)
See more:
Dear ,

I need to upload .xlsx file i.e office 2007 file in my database.

for reading this file i am using followong connection string

"Provider=Microsoft.ACE.OLEDB.12.0;"+"Data Source=" + fileName + ";"
+"Extended Properties=Excel 12.0;HDR=YES;";


But while opening connection i am facing the error "could not find installable isam".

To avoid this and read both files i.e office 200.3 and 2007 also what should i do ?

Please guide me.

Thank you.
Posted
Updated 15-Mar-16 3:49am

if the databse that you are using is MDB then
there is a way,just put the provider and database name not the database path(if it resides in the current directory) :)

LIKE this "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=YourDB.mdb;"
 
Share this answer
 
v3
It working..................

Import Excel 2007 from asp.net steps
Installed - AccessDatabaseEngine

connection sting should be like this....

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\excel\\ExcelImport_8-2009.xlsx;Extended Properties=\"Excel 12.0 Xml;HDR=NO;IMEX=1;\""

Hurray!!!!!!!!!!!!!!!!!

Here in connection string HDR=No means header row is not indication column name and HDR=YES means yes first row in excel sheet indicates columns.
 
Share this answer
 
v2
Comments
OsoJames 10-May-13 9:52am    
I am still having the same error, can you please help me out? I am using Excel 2010
Dharmesh Shriwastava 22-Sep-14 15:21pm    
thanks
getvinay1988 14-Oct-14 3:50am    
This worked for me, thanks!!
Member 4649476 18-Jun-16 6:22am    
Not working for me
toyfercho 29-Aug-16 23:59pm    
Really help me and worked for me also, interesting the same issues happened over the years,

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\excel\\ExcelImport_8-2009.xlsx;Extended Properties=\"Excel 12.0 Xml;HDR=NO;IMEX=1;\""

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