Save a Pandas DataFrame to Excel file to Azure Databrick blob using Python

NA-UPPUADEVCTBA03 21 Reputation points

Hi Azure team,

I am wondering if you could help me with a question that I am trying to solve. I would like to load data from excel file and save the modified data back to excel file in the Azure blob storage.

I am able to loaded two tables that are contained in two separate sheets within an excel file using read_file_from_blob function. Now I am trying to save these datasets back to one single excel file with each table on a separate sheet/tab. I am aware there is function named write_to_blob, but it allows only csv format for pandas dataframe object.

Please let me know if this is available in Azure. If you could please point me to the documentation that will be helpful.


Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
1,955 questions
0 comments No comments
{count} votes

Accepted answer
  1. HarithaMaddi-MSFT 10,136 Reputation points


    Welcome to Microsoft Q&A Platform. Thanks for posting the query.

    Currently, as per my understanding, there is no support available in databricks to write into excel file using python. Suggested solution would be to convert pandas Dataframe to spark Dataframe and then use Spark Excel connector to write into excel files. This link explains the details clearly for the same requirement.

    Additional reference: how-to-read-excel-file-using-pandas.html, Spark Excel Video

    Please let us know for additional queries and we will be glad to assist further.


    • Please accept an answer if correct. 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.
    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 13,956 Reputation points MVP


    Thank You for your question posting in Q & A.

    To save Dataframe to blob using Azure databricks, refer this url.

    If a post helps to resolve your issue, please click the Accept the answer and Click Answered Vote as helpful . By marking a post as Answered and/or Helpful, you help others find the answer faster.