Home > Software engineering >  How to create an excel file with multiple sheets using Julia?
How to create an excel file with multiple sheets using Julia?

Time:12-01

I'm programing in Julia and trying to create an excel file with multiple sheets for saving some data. The problem is that the function XLSX.openxlsx() only creates excels with one sheet. I'm trying to run the following code.

XLSX.openxlsx("test_file.xlsx", mode="w") do xf
    sheet = xf[1]
    XLSX.rename!("first")
    sheet["A1"] = "A"
    sheet = xf[2]
    XLSX.rename!("second")
    sheet["A1"] = "B"
    sheet = xf[3]
    XLSX.rename!("third")
    sheet["A1"] = "C"
end

Does anyone know how to create excel files with multiple sheets? or maybe create new sheets in an existing file?

CodePudding user response:

enter image description here

  • Related