XLSX.jl
XLSX.jl copied to clipboard
writetable with multiple sheets generates .xlsx file with only one sheet visible to applications with less robust .xlsx readers
When using writetable to create an .xlsx file with multiple sheets, only a single sheet is visible when opened in some applications, for example: Tableau. I believe this is because only a single sheet tag is generated in the [Content_Types].xml component of the .xlsx file, where there should be a tag for each sheet.
The work around is to open the newly generated file in Excel first and then save the changes before opening in the other application.
I wish to avoid the work-around step as I'm creating an automated workflow using Julia and Tableau. Is this something that can be addressed?
Can you confirm that editing ContentTypes file fixes the problem?
Hi Felipe, Yes. I've just now edited the .xlsx file and added extra sheet tags. The added sheets are now visible when opening in Tableau.
The sheet tag is:
<Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>
Each new tag needs to have the sheet name in the xml path incremented by 1: /sheet2.xml, /sheet3.xlml, etc.
I hope this helps.