select URL from [qas$] where Month='March' and Year=2000
Note that the table name is the name of the worksheet with a $ appended to the end. You have to append the $ in order for the query to work. Why?
Because spreadsheets aren't tables... You have several ways of telling, which data you want: [qas$] refers to the entire worksheet qas [qas$B2:G20] refers to the unnamed range B2:G20 or you can use named ranges: then you can use the name of the range like any "normal" table ( select * from myRangeInQas )
Because. The brackets are there because $ is a reserved character in SQL. Life is never easy. -----------------------
Now all I want to do is SELECT *...I don't need anything fancier than that, I'm just trying to publish the entire worksheet. No variation on the above code snippet seems to work.
Has anybody gotten SQL queries into excel to work? And how did you do it?
The way you described works fine for me... Does the first row of your worksheet show the columnnames? Any of them starting with blank ? Maybe you tell us, what happens when "it doesn't work"... Chris
participants (1)
-
Christian.Fissgus@haufe.de