This exports data and formulas to two sheets. I spent a couple of hours trying different ways to name the sheets, but so far I either get gibberish in the Excel file or an error such as:
Export: {Data, Sheets} is not a valid set of export elements for XLSX.
It would be great to have some real-world examples in the documentation.
Thanks Henrik, but unless I’m missing something, the “basic examples” (Wolfram’s term, not mine) does not go into how do export formulas to Excel. Am I missing something?
That said, you are correct Henrik. There is an example. Though, to me, a spreadsheet is about more than numbers. It would be great to see a real-world example that utilized the capabilities of Excel beyond what a CSV file can handle.
Though this raises an interesting question, do others include formulas in the Excel exports?
Hi Mike, I am sorry I misunderstood your question! I was regarding “formulas” in terms of Mathematica - instead in terms of Excel. So it is definitely a good question you posed! Regards – Henrik
I really do wish Excel would go away. But, from what I can tell, we becoming more entrenched in Excel. Of course, this does make a few people and companies lots of money.
It is great to see that Wolfram has embraced Excel with Excel-Link. Hopefully I will be able to convince those around me to give it a try.
Thank you for posting this Mike. Although it’s two years later, your solution is exactly what I needed. I spent all day struggling to decipher the documentation and a few StackExchange posts but never considered naming the “data” component of each Worksheet.
My objective is to export three distinct Datasets as individual sheets in an .xlsx file. When I follow the solution above, each exported Dataset appears as a single line in its respective sheet. Whereas if I export each Dataset as its own stand-alone .xlsx file, the exported Dataset are formatted correctly in their individual .xlsx files with correct column names and data rows.
Thank you for coding the example and confirming it must be a bug. Case 5008589 is submitted to Wolfram Technical support and a link to this discussion was included in the notebook.