# Error while exporting to Excel with named sheets

Using Mathematica v9.0.1 This example is from the docs:

data1 = Table[{t, 9.8*t^2}, {t, 0, 3, .1}];
data2 = Table[{t, 9.8*t^2}, {t, 0, 5, .2}];
Export["datasets.xlsx", "Sheets" -> {"Experiment 1" -> data1,
"Experiment 2" -> data2}, "Rules"]


Returns:

JLinkJava::argxs: The static method SystemConvertExcelDumpwrite was called with an incorrect number or type of arguments. The arguments, shown here in a list, were {XLSX,C:\Documents and Settings\xxx\datasets.xlsx,{Experiment 1,Experiment 2},{{{0.,0.},{0.1,0.098},<<27>>,{2.9,82.418},{3.,88.2}},{<<1>>}},{{{Null}}},{{{}}},Author->Created by Wolfram Mathematica 9.0 : www.wolfram.com}.

While the following:

Export["datasets.xlsx", {data1, data2}]


works OK, but I need sheet names.

Any idea?

-
I get the same with 9.0.1 on Mac 10.8.4 . Said a few times here that I can't see why the docs can't be programmatically checked for these sorts of errors. Seems like poor QA standards. –  Mike Honeychurch Jul 29 '13 at 2:42
Another example further down in the docs gives the same error. Very sloppy QA. –  Mike Honeychurch Jul 29 '13 at 2:46
@MikeHoneychurch Yep. I posted this one just because it's somewhat easier to read, but the other syntax results in the same error –  belisarius Jul 29 '13 at 3:05
Seems to work now in V10 –  Mike Honeychurch Jul 16 at 4:28

The following syntax works for exporting the two sheets:

data1 = Table[{t, 9.8*t^2}, {t, 0, 3, .1}];
data2 = Table[{t, 9.8*t^2}, {t, 0, 5, .2}];
Export["datasets.xlsx", {"Experiment 1" -> data1,
"Experiment 2" -> data2}]


It creates an XLSX file with two seperate sheets holding the datasets:

However, i agree with the comments above that QA for this is indeed very poor.

-
Great! A pity that I had to circumvent the whole thing in a hurry :( –  belisarius Jul 29 '13 at 14:23
Many thanks for that one –  TomD Jul 29 '13 at 16:37