


If i change the connectiong string to "Provider=.12.0 Data Source=" + ofn.FileName + " Extended Properties=\"Excel 12.0 HDR=YES\"" to open an xls file it is also giving error and reading it correctly. StrExcelCon = "Provider=.12.0 Data Source=" + ofn.FileName + " Extended Properties=\"Excel 12.0 Macro HDR=YES\"" rpat72 asked on opening a csv file using oledb extended property. Come for the solution, stay for everything else. Home Pricing Community Teams About Start Free Trial Log in. StrExcelCon = "Provider=.12.0 Data Source=" + ofn.FileName + " Extended Properties=\"Excel 12.0 HDR=YES\"" Find answers to opening a csv file using oledb extended property from the expert community at Experts Exchange. StrExcelCon = "Provider=.12.0 Data Source=" + ofn.FileName + " Extended Properties=\"Excel 12.0 Xml HDR=YES\"" " Extended Properties=\"Excel 8.0 HDR=YES IMEX=1\"" StrExcelCon = "Provider=.4.0 Data Source=" + ofn.FileName + How to handle this situation, is making app 32 bit is the only solution ?, what i loose making it 32 bit ? my pc has got 16gb ram switch (filextntn) If i build application 32bit it open file correctly, but if i make it 64 bit i can not install .4.0. All I have to do is change the numeric to non-numeric for that field only and it works fine!! e.g CDTExpiry,1 to CDTExpiry,a.Īnyone know why this would be happening, as I am using this code for a bulk load of data from the csv file, and I don't want to always check the file first for this line of Code.I am having Windows 64 Bit os build 19043.1826 21H1, i have office 21 64 bit on this pc, but when i want to open an xls file i am getting the above error,

OleDbDataAdapter dAdapter = new OleDbDataAdapter(query, connString) įor some reason the CDTExpiry field is giving an issue. create an OleDbDataAdapter to execute the query create a DataTable to hold the query results + "Extended Properties=\"text HDR=Yes FMT=Delimited\"" create the "database" connection string String dir = Path.GetDirectoryName(full)

Public static DataTable ParseCSV(string path) I am using the following code to read the file: using System Here are the file contents: **ColumnName, Column Value**
