Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I try to export two grid in a same xls file, naming the sheets. This is an exemplification of my issue, and it doesn't work.

m = Grid[Table[i - j, {i, 3}, {j, 4}]];
Export["m.xls", m]

it works correctly, but if I try this code, naming the sheet, it doesn't work

Export["m.xls", {"MySheet" -> m}]


share|improve this question

1 Answer 1

The Grid is the reason why it does not work! Try this for multiple sheets

x = RandomReal[1, {5, 5}];
y = RandomInteger[{-10, 10}, {5, 5}];
Export[$UserBaseDirectory <> "\\file.xlsx", {"Real" -> y,"Integer" -> y}]

In your case

m=Table[i - j, {i, 3}, {j, 4}];
Export[$UserBaseDirectory <> "\\file.xlsx","MySheet" -> m]
share|improve this answer

Your Answer


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.