Forum Discussion
jborn
Sep 13, 2023Copper Contributor
Query from Excel in Synapse Serverless
I'm trying to use the following code to read from an Excel file using Synapse Serverless. Is this even possible?
SELECT *
FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0 Xml;HDR=YES;Database=https://container.blob.core.windows.net/datalake/Bronze/Manual/Testing 20230106.xlsx', 'SELECT * FROM [ProductList$]')
AS ROWS;
I'm getting an error near Openrowset which is less than helpful from the Synapse Serverless SQL engine
1 Reply
- Martin-Apps4RentIron Contributor
Synapse Serverless can’t read Excel files directly. Convert the Excel file to CSV, upload it to Blob Storage, then query it using OPENROWSET with FORMAT = 'CSV'.