8
$\begingroup$

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?

$\endgroup$
4
  • 4
    $\begingroup$ 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. $\endgroup$ Commented Jul 29, 2013 at 2:42
  • 1
    $\begingroup$ Another example further down in the docs gives the same error. Very sloppy QA. $\endgroup$ Commented Jul 29, 2013 at 2:46
  • $\begingroup$ @MikeHoneychurch Yep. I posted this one just because it's somewhat easier to read, but the other syntax results in the same error $\endgroup$ Commented Jul 29, 2013 at 3:05
  • $\begingroup$ Seems to work now in V10 $\endgroup$ Commented Jul 16, 2014 at 4:28

1 Answer 1

8
$\begingroup$

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:

enter image description here

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

$\endgroup$
2
  • 1
    $\begingroup$ Great! A pity that I had to circumvent the whole thing in a hurry :( $\endgroup$ Commented Jul 29, 2013 at 14:23
  • $\begingroup$ Many thanks for that one $\endgroup$
    – user1066
    Commented Jul 29, 2013 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.