I'm trying to use adodb to query excel files. But some files have nonstandard sheet/column name.
strQry = "select * from [ sheet1$A1:A50]"
I got an error saying "Invalid bracketing of name". How do I run query on sheet that has an extra space in its name? These are raw files from clients so I don't want to change the name or anything.
Also, I have another problem regarding the column.
strQry2 = "select [column\rA] from [sheet1$E1:E122]"
"\r" is a line break. I got an error "No value given for one or more required parameters."
Any advice on how to deal with these issues?
UPDATE:
Sheet 1
works fine but the sheet I have is named something like Sheet1
(extra space before sheet1.
Some of the column headers have a line break/carriage return within column name, like "column" & vbcrlf & "name". Is there a way to query these?