How to write into multiple excel sheets using fsspec?

30 Views Asked by At

I am trying to write several data frames into multiple sheets using fsspec in azure synapse, but the issue is that the data getting overwrite to single sheet and finally only 1 data frame is availabel in the output file. How can I correct this to have multiple sheets with all the data frames written?

my code is like this:

fsspec_excl = fsspec.open(path, account_name=adls_account_name, account_key=adls_account_key, mode="wb")
with fsspec_excl.open() as f:
 df1.to_excel(f,sheet_name="Sheet1")
 df2.to_excel(f,sheet_name="Sheet2")
 df3.to_excel(f,sheet_name="Sheet3")
0

There are 0 best solutions below