1

I am trying to work with .xlsx file with the below Connection string in my C# code .

public static string ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;
   Data Source=@@filename;
   Extended Properties=""Excel 12.0 Xml;
   IMEX=0;
   HDR=YES;
   TypeGuessRows=0;
   ImportMixedTypes=Text""";

But whenever I am running the Code I am getting Error

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

himanshu jain
  • 89
  • 1
  • 13

0 Answers0