cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Streaming xls files Using Auto Loader

YS1
New Contributor III

Hello,

Is there a way to read .xls files using auto loader or is there any workaround since excel files are not supported by the auto loader per the following document?

https://docs.databricks.com/en/ingestion/auto-loader/options.html

Thanks.

6 REPLIES 6

shan_chandra
Esteemed Contributor
Esteemed Contributor

@YS1 - Can you please check if you can convert .xls to .csv files and ingest using autoloader?

YS1
New Contributor III

@Isha I tried to read them directly as csv files using different delimiters but the files weren't parsed correctly. The problem is that you have to check for the files that weren't read by the auto loader and then convert them to csv which is not the target here of the auto loader. My main goal is to read the files as they arrive to my folder without the need to check which one was read before.

jose_gonzalez
Moderator
Moderator

You can try to read the file as text file, using "wholeText" option https://docs.databricks.com/en/ingestion/auto-loader/options.html#text-options and then the whole file contents will be passed to the from_xml function and it will return an array of the records. Give it a try.

YS1
New Contributor III

@jose_gonzalez I tried that, but it's giving me weird values. not sure what's wrong with that. 

YS1_0-1705592759818.png

 

Sicnarf
New Contributor II

I am facing the same issue--I have a stream that I'd like to use autoloader on with an .xlsx. Is there any update to any workarounds on this issue?

YS1
New Contributor III

I couldn't find any. I had to change the type of the files.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!