Re: how to specify sheet names in xls export?
- To: mathgroup at smc.vnet.net
- Subject: [mg96943] Re: how to specify sheet names in xls export?
- From: Bob F <deepyogurt at gmail.com>
- Date: Fri, 27 Feb 2009 06:17:47 -0500 (EST)
- References: <go63v8$q4j$1@smc.vnet.net>
On Feb 26, 6:03 am, Mitch Murphy <mitch at lemma.ca> wrote:
> is there a way to specify the sheet names when exporting excel xls
> spreadsheets? i couldn't find much details in the documentation. my
> best attempt so far is:
>
> Export["test_sheet_name.xls", Table[100 i + 10 j + k, {i,=
2}, {j, 3},
> {k, 4}], "Sheets" -> {"a", "b"}]
>
> but that doesn't work...
>
> any help/suggestions please?
>
> thanks,
> Mitch
There is an example in the Mathematica documentation that shows how to
do this. Look up about "export a spreadsheet" or look at
http://reference.wolfram.com/mathematica/howto/ExportASpreadsheet.html
-- basically you could do
m = Table[i - j, {i, 5}, {j, 6}]
n = Table[i - j, {i, 3}, {j, 7}]
Export["mfile2.xls", {"m Data" -> m, "n Data" -> n}]
and then the sheets are named "m Data" and "n Data". HTH
-Bob