Does anybody know if it’s possible to use ExcelFiles.jl to save multiple sheets to a single xlsx file? I have 3 DataFrames that I would like to save as 3 separate sheets in a xlsx file.
No, not possible at this point. That would be a great extension, though!
You might be able to do it with XLSX.jl directly (which ExcelFiles.jl uses under the hood).
I see. I’m pretty sure it’s possible to do it with XLSX.jl. I’ll have a look.
I didn’t know ExcelFiles.jl uses XLSX.jl under the hood. I was using XLSX.jl before but then switched to ExcelFiles.jl because I like its API better and because it integrates so well with the whole Queryverse story.
David, thanks a lot for your reply and all your hard work on this topic (and many others).
See the example in the docs: https://felipenoris.github.io/XLSX.jl/stable/tutorial/#Export-Tabular-Data-as-a-DataFrame-1
I tried the instructions in the example you linked in order to write 3 DataFrames to 3 separate sheets in an xlsx file but, after waiting for more than 15 minutes, I just cancelled the operation. Here’s the DataFrames I’m trying to write to the xlsx file:
df_1 370.184 MiB 7708×329 DataFrame df_2 431.276 MiB 7708×329 DataFrame df_3 130.482 MiB 3857×329 DataFrame
These DataFrames come from csv files about 40 MB in size (df_3 comes from a 12.7 MB csv file).
I guess this may be related to this issue: https://github.com/felipenoris/XLSX.jl/issues/61
Yes, writing large Excel files takes forever. I’m sorry about that.
I’ll rewrite the package to fix this.