K
Kim Carlsen
Hi
How do I do a select from a excel sheet where the column header contain
brackets? the actual name is [ID] ? I
i can't see how to escape correctly.
The code looks like:
String strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=c:\test.xlsx;Extended Properties=Excel 12.0;";
String strSelect = "SELECT [ID] FROM [sheetname$]";
OleDbDataAdapter daMaster = new OleDbDataAdapter(strSelect, strConn);
Regards
Kim
How do I do a select from a excel sheet where the column header contain
brackets? the actual name is [ID] ? I
i can't see how to escape correctly.
The code looks like:
String strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=c:\test.xlsx;Extended Properties=Excel 12.0;";
String strSelect = "SELECT [ID] FROM [sheetname$]";
OleDbDataAdapter daMaster = new OleDbDataAdapter(strSelect, strConn);
Regards
Kim