A few questions on exporting charts and formatted output to Excel

I am trying to understand if I can move part of my code from Python to Julia, at least the part which cannot be optimised with Numba, and have a few questions on exporting data from Julia to Excel.

This is crucial because I often have to share tables and charts resulting from my output, and spreadsheets are a very convenient way to do so.

  1. How easy is it to export formatted output to Excel? E.g. you export 20 tables o 4 Excel spredsheets, and you format the output setting some ranges to percent, some to 4 decimal digits, etc.

  2. Can you create worksheet tables, like in Python’s xlsxwriter?

  3. Can you export charts created with Julia? Eg with matplotlib and seaborn I can save a chart in memory, without writing it to a file, and then export the corresponding png into Excel.

  4. Can you apply conditional formatting?

  5. Can you also create Excel formulas?

  6. Is there any test on whether Julia is faster than Python pandas and R exporting large amounts of data to Excel? Some of the data are effectively big matrices that result from certain numerical simulations; pandas is relatively slow exporting that data to Excel (orders of magnitude slower than exporting to CSV).

Browsing the tutorial for xlsx.jl it seems that package is fairly basic and doesn’t do mos of the things I asked above. Is that true? Are there other packages maybe?

I believe you are correct with respect to XLSX.jl’s capabilities. Another package often mentioned in this space is Taro.jl, although I’ve never used it so I wouldn’t know whether it offers more features.

Generally I don’t think Julia<->Excel interoperability is the greatest, my feeling is that there’s only a very small minority of Julia users that regularly has to interact with Excel, and that’s reflected in the package ecosystem.

I see, thanks. Well, this alone kinda kills Julia for me, as a big part of what I do is to present summary tables charts etc to summarise the work.
I guess Julia is more used for engineering and scientific simulations/calculations, where the needs are different. Would you agree?

I haven’t tried it, but PyCall.jl should let you use xlsxwriter.py. If most of what you are doing is calculations and then some work to make the presentation materials this might be a way to do what you want. Julia’s integration with Python is quite good!

I think there is definitely a community of more “data-sciency” users around (I would probably include myself in that), but most people would probabl tend to use other formats (Jupyter Notebooks, or more recently Pluto notebooks) to produce presentable outputs.

Where I do need Excel integration I mostly use the functionalities that do exist in XLSX.jl (i.e. writing to a certain part of a workbook) and just have a “Julia Outputs” tab that I dump stuff into, which then other tabs pull from to create “presentable” outputs. As I find it much easier to play with the formatting using Excel’s GUI anyway I don’t feel I’m losing anything from this, but of course the approach has its limitations.

Thanks, but in my case I don’t have many alternatives. I need something which:

  • does not require any additional software
  • can be opened on mobiles and tablets, as well as computers
  • lets my audience see and “play with” tables of numbers, eg sum the first 3 rows of a table, etc
  • lends itself to structured output; eg say you have 3 tables and 3 charts per country, it is very easy to export to an excel sheet with one sheet per country.

I would love to have the connection between Julia and Excel.

After done with my code in Julia, I would like to embed interactive plots in my PowerPoint presentation, which can only be done by Excel.

Sounds like a job for Pluto or Jupyter+Interact?