Place single quotes around the Extended Properties
:
OleDbConnection oconn =
new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties="Excel 8.0;HDR=YES;IMEX=1;";");
Try it, it really works.
More Related Contents:
- Non-web SQL Injection
- Trying to use variables as values vba to sql
- How to insert an embedded picture?
- Rounding in MS Access
- Get length of array?
- ADODB Connection String for .csv
- Comparison of Dictionary, Collections and Arrays
- How to query a MS-Access Table from MS-Excel (2010) using VBA
- What is the different between IsNull, IsEmpty, =Empty, and an empty string ie “” and why might I use variants
- Print function selecting wrong Type of Change option excel vba
- What is the difference between .text, .value, and .value2?
- What is the difference between “Form Controls” and “ActiveX Control” in Excel 2010?
- Check if the file exists using VBA
- How can I create a progress bar in Excel VBA?
- Excel VBA Macro: User Defined Type Not Defined
- Automate IE via Excel to fill in a dropdown and continue
- Run-Time error 1004 Excel 2013
- VBA rounding problem
- How to call a macro from a button and pass arguments
- VBA (Excel) Dictionary on Mac?
- Refresh Excel VBA Function Results
- excel VBA run macro automatically whenever a cell is changed
- Code for looping through all excel files in a specified folder, and pulling data from specific cells
- VBa conditional delete loop not working
- Concatenate column headers if value in rows below is non-blank
- Update excel sheet based on outlook mail [closed]
- Excel VBA – select multiple columns not in sequential order
- How to check whether certain sheets exist or not in Excel-VBA? [duplicate]
- Excel – Using COUNTIF/COUNTIFS across multiple sheets/same column
- Excel telling me my blank cells aren’t blank