If I have two lists:
list1 = {{1, 2}, {3, 4}};
list2 = {{5, 6}, {7, 8}};
I want to export these two lists to an Excel file and have list1
in a a worksheet called "list1" and list2
in a worksheet called list2. How do I do that ...using information contained in ref/format/XLSX
and ref/format/XLX
?
Edit
What I had in mind actually was from the Import and Export sections of the documentation for XLSX that give descriptions of the syntax for exporting.
Export["file.xlsx",expr, elem] creates an XLSX file by treating expr as specifying element elem.
Export["file.xlsx",{expr1,expr2,...},{{elem1,elem2,...}}] treats each expri as specifying the corresponding elemi.
Export["file.xlsx",expr,opt1->val1,...] exports expr with the specified option elements taken to have the specified values.
Export["file.xlsx",{elem1->expr1,elem2->expr2,...},"Rules"] uses rules to specify the elements to be exported.
Could I re-phrase and ask if someone could explain how the Export syntax examples above map to a working export to two worksheets? For example elements in the documentation, at the top of the documentation page anyway, are not listed for Export
(other than "Data") but are listed as e.g. "Data","Formulas" etc. for Import
. So I am unclear about how any of those export syntax examples correspond to something containing a worksheet name.