Reputation: 2992
I want to import an XLSX file into sql database. If I use this connection string
string connectionString = String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""", openFileDialog1.FileName);
Ijust can import Xls file , what should I do to import the Xlsx file?
Upvotes: 0
Views: 1506
Reputation: 52
This guide help http://www.ashishblog.com/importexport-excel-xlsx-or-xls-file-into-sql-server/
you need Data Connectivity Components for the xlsx file download driver of your version of office
Upvotes: 1