question

arkiboys avatar image
0 Votes"
arkiboys asked HimanshuSinha-MSFT answered

read .xlsx files

Hello,
In the serverless sqlpool I have created views to read .csv files using openrowset, etc.
How is it possible to read a .xlsx file?

I tried something like this but it is not correct
SELECT *
FROM OPENROWSET(
BULK 'Input/file.xlsx',
DATA_SOURCE = 'xyz',
FORMAT = 'Excel',
HEADER_ROW = TRUE
)
AS [r]

Thank you

azure-data-factory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

HimanshuSinha-MSFT avatar image
0 Votes"
HimanshuSinha-MSFT answered

Hello @arkiboys
Thanks for the ask and using Microsoft Q&A platform . Read more here

With OPENROWSET excel is not not a supported file type .

Important points from the doc .

Arguments
You have two choices for input files that contain the target data for querying. Valid values are:
'CSV' - Includes any delimited text file with row/column separators. Any character can be used as a field separator, such as TSV: FIELDTERMINATOR = tab.
'PARQUET' - Binary file in Parquet format
'DELTA' - A set of Parquet files organized in Delta Lake (preview) format


Thanks
Himanshu


  • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification

  • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.