|How do I...|
I'm using c# to read an excel workbook that has spaces in the column header.
string SelectCommand = "Select Account, City, 'Store Number' as Strnbr from [Sheet1$]";
backtick - `Store Number` - gets error at runtime
brackets - [Store Number] - gets error at runtime
single quote 'Store Number' - returns the string "Store Number" rather than actual data
double quote /"Store Number/" - returns the string "Store Number" rather than actual data
In sql, using double quotes around the header works, but it's not working with c#.
Does anyone know the syntax to get this to work? Thanks.