System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format

0

I am trying to use a .xlsx file as a database, but im getting the error External table is not in the expected format. I have used the below code for connection string

string connstr = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
    + inputExcelPath + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1\";";

OleDbConnection conn = new OleDbConnection(connstr);
c#
oledb
asked on Stack Overflow Sep 2, 2020 by Nandhini Gs • edited Sep 2, 2020 by stuartd

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0