XLSX package

I am coming to Julia from R. I really like Julia, but it is limited by rather poor documentation.

I could not find good documentation for the XLSX package. I found instructions online for creating an xlsx file from a data frame, but the code didn’t work. Here’s what worked:

XLSX.writetable(
outxlsx,
World = (eachcol(world_df), names(world_df)),
World_Seen = (eachcol(world_seen), names(world_seen)),
Hummingbirds = (eachcol(world_hummingbirds), names(world_hummingbirds)),
Hummingbirds_Seen = (eachcol(hummingbirds_seen), names(hummingbirds_seen))
)

outxlsx is the path to the workbook I am creating,
This code creates four sheets in the workbook from four data frames.

Welcome to the Discourse forum!

You say this isn’t working: Tutorial · XLSX.jl?

If that should be the case, please share the code you tried (enclosed in triple backticks, like ``` ) and the error message (full stack trace).

Also, the docs for the writetable function give an example of how to write multiple DataFrames at once, each to a separate Excel tab.

XLSX.writetable("report.xlsx", "REPORT_A" => df1, "REPORT_B" => df2)

Thanks. The webpage I found had “collect” in the argument list for each sheet, which didn’t work. My problem was finding the correct documentation. Thanks for showing it to me.

If you look for a package, always Google for the full package name, in this case xlsx.jl. The first hit is Home · XLSX.jl .

Sometimes you might find the GitHub page of the package. In that case, click on the Button “docs stable” on the top left of the README.md file to see the HTML documentation.

Some packages don’t have an HTML documentation. In that case, read the README.md file of the package on GitHub or ask here.

1 Like

Thanks! I’ll be using this package a lot. I don’t think that I will be using R or Python much from now on.

Terry

2 Likes