cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Extra underscore behind ".xlsm" and ".xlsx" after exporting excel files from Databricks

MinMin
New Contributor II

Hi all, 

I tried to export several excel files from Databricks. But there will always be one extra underscore behind ".xlsm" and ".xlsx", if I export them and try to open the files on local system. I have to manually remove the underscore from the filename and then I am able to open the excel files. 

For the solutions, I downloaded different browsers to implement it. It doesn't work either. 

I also tried to change the workspace settings. Does anyone know how I can reconfigure the settings to solve the problem? 

I will be super grateful if you can provide some hints!

Thanks ๐Ÿ™‚

4 REPLIES 4

MinMin
New Contributor II

MinMin_0-1700494219988.png

 

Kaniz
Community Manager
Community Manager

Hi @MinMin , Certainly! Dealing with unexpected underscores in exported Excel files can be quite frustrating. 

 

Letโ€™s explore some potential solutions to address this issue:

 

File Naming Issue:

  • The extra underscore in the exported filenames might be due to a specific naming convention or an unintended behavior during the export process.
  • To avoid this, consider renaming the files directly within Databricks before exporting them. Ensure that the filenames do not contain any special characters or underscores.

Exporting Options:

Python Pandas Workaround:

Check Workspace Settings:

  • Review your Databricks workspace settings related to exports and file formats.
  • Ensure that there are no custom settings or restrictions causing the unexpected behavior.

 

Remember to test each solution step by step to identify the root cause and find the most effective resolution. I hope these hints help you resolve the issue! ๐ŸŒŸ

MinMin
New Contributor II

Hello @Kaniz,

Thank you very much for the response ๐Ÿ™‚

My team tested the solutions as you mentioned above. But it didn't work ๐Ÿ˜ž

Note: No code is used to download the excel file. We are trying to directly export the file from Databricks workspace (see screenshot).

MinMin_5-1700750698323.png

The problem appears for all users and not just for this one excel file.

As I mentioned it's not just for excel, it's for all types of files I export in this way: .txt or .py etc.

MinMin_6-1700750728703.png

I'm looking forward to your feedbacks!

 

DH_Fable
New Contributor II

Hi, did you find a solution this? I have the same/similar problem where when I save a dataframe from a Databricks notebook using to_excel() it saves the file with extension ".xlsx_" rather then "xlsx", meaning to open I have to manually download and change the file type

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.