Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
4  
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
1  
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
add comment

1 Answer

up vote 6 down vote accepted

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.

share|improve this answer
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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