Skip to main content

I have a SQL query to read the data from excel, and using the select query like below

SELECT DISTINCT [F1],SUM([F6]) FROM [Sheet1$A2:G] GROUP BY [F1]

but there is no data in sheet1 hence it is showing the error like 'This table contains cells that are outside the range of cells defined in the spreadsheet'. can anyone help me with this

 

Hi @Shilpa N​ ,

 

I don't think passing in a range will do you much good.

Even if you are using SQL, it is limited to microsoft Access , and even more so when working with Excel.

 

Try passing the entire sheet name instead:

 

SELECT DISTINCT TF1],SUM(]F6]) FROM Sheet1$] GROUP BY UF1] ->If v11

 

SELECT DISTINCT SF1],SUM(1F6]) FROM )Sheet1$$] GROUP BY OF1] -> If A360

 

Kind Regards,

Ashwin A.K

 


Thanks Ashwin,

 

let me try this solution.

 

 


Reply