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.

Background ( simplified ): When I export data to Excel like

 Export["voorbeeld.xls", {{{0.5, 0.166667}, {0.666667, 
0.166667}, {0.166667, 0.333333}, {0.333333, 0.333333}, {0.5, 
0.333333}, {0.666667, 0.333333}, {0.833333, 0.333333}, {0.166667, 
0.5}, {0.333333, 0.5}, {0.5, 0.5}, {0.666667, 0.5}, {0.833333, 
0.5}, {0.5, 0.666667}, {0.666667, 0.666667}}, {{1., 2., 6., 
5.}, {3., 4., 9., 8.}, {4., 5., 10., 9.}, {5., 6., 11., 10.}, {6.,
 7., 12., 11.}, {10., 11., 14., 
13.}}, {{RGBColor[0.9308155947203784, 0.9308155947203784, 
 0.9308155947203784]}, {RGBColor[1, 0, 0]},    RGBColor[0., 1., 
0.14062714579995422], {RGBColor[1., 0.11317616540779736, 
 0.000015259021896696422]}, {RGBColor[1., 0.9651483939879454, 
 0.38461890592813003]}, {RGBColor[0.9685511558709087, 
 0.9685511558709087, 0.9685511558709087]}}}]

I would expect the data to be inserted into cells but Excels uses just 3 cells. When I imported the same data the three main lists were stored in seperate sheets in Excel.

Example 2:

list3={{RGBColor[0.9308155947203784`,0.9308155947203784`,0.9308155947203784`]},
 {RGBColor[1,0,0]},RGBColor[0.`,1.`,0.14062714579995422`], 
 {RGBColor[1.`,0.11317616540779736`,0.000015259021896696422`]},
 {RGBColor[1.`,0.9651483939879454`,0.38461890592813003`]},
 {RGBColor[0.9685511558709087`,0.9685511558709087`,0.9685511558709087`]}}

Export["voorbeeld.xls",list3] creates a column with RGB values. Export["voorbeeld.xls",{list3}] creates one cell. Does this help?

Question: is there a solution / workaround for this issue?

Example 2:

 list3={{RGBColor[0.9308155947203784`,0.9308155947203784`,0.9308155947203784`]},      {RGBColor[1,0,0]},RGBColor[0.`,1.`,0.14062714579995422`],{RGBColor[1.`,0.11317616540779736`,0.000015259021896696422`]},{RGBColor[1.`,0.9651483939879454`,0.38461890592813003`]},{RGBColor[0.9685511558709087`,0.9685511558709087`,0.9685511558709087`]}}

  Export["voorbeeld.xls",list3] creates a column with RGB values.
  Export["voorbeeld.xls",{list3}] creates one cell.
  Does this help?
share|improve this question
    
I presume because you have US settings in your OS. –  ndroock1 Apr 17 '12 at 13:55
    
SORRY. I simplified if too far. I will EDIT the question without assumptions about the cause. –  ndroock1 Apr 17 '12 at 14:04
    
See my edit. RGBColor can be stored in separate cells. –  ndroock1 Apr 17 '12 at 14:38
add comment

1 Answer 1

up vote 6 down vote accepted

The last "sheet" in

data = {{{0.5, 0.166667}, {0.666667, 0.166667}, {0.166667, 
 0.333333}, {0.333333, 0.333333}, {0.5, 0.333333}, {0.666667, 
 0.333333}, {0.833333, 0.333333}, {0.166667, 0.5}, {0.333333, 
 0.5}, {0.5, 0.5}, {0.666667, 0.5}, {0.833333, 0.5}, {0.5, 
 0.666667}, {0.666667, 0.666667}}, {{1., 2., 6., 5.}, {3., 4., 9., 
 8.}, {4., 5., 10., 9.}, {5., 6., 11., 10.}, {6., 7., 12., 
 11.}, {10., 11., 14., 
 13.}}, {{RGBColor[0.9308155947203784, 0.9308155947203784, 
 0.9308155947203784]}, {RGBColor[1, 0, 0]}, 
RGBColor[0., 1., 
 0.14062714579995422], {RGBColor[1., 0.11317616540779736, 
 0.000015259021896696422]}, {RGBColor[1., 0.9651483939879454, 
 0.38461890592813003]}, {RGBColor[0.9685511558709087, 
 0.9685511558709087, 0.9685511558709087]}}}

(i.e. list3) is the source of the problem. If you fix the third element RGBColor[0., 1., 0.14062714579995422] and put {RGBColor[0., 1., 0.14062714579995422]} like you have for the others it exports correctly, which each element of data as a table on its own sheet.

Also, you can always force it to Export sheets, by specifying:

Export["file.xls", data, "Sheets"]
share|improve this answer
    
Oke, I will try NOW –  ndroock1 Apr 17 '12 at 14:39
    
Yes, how embarrassing, a plain coding BUG. Yikes! Thank you very much. –  ndroock1 Apr 17 '12 at 14:42
2  
It happens to all of us! –  Eli Lansey Apr 17 '12 at 14:44
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.