Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Export into Excel Worksheets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90864] Re: [mg90811] Export into Excel Worksheets
  • From: Andy Anderson <aanderson at amherst.edu>
  • Date: Sat, 26 Jul 2008 04:24:36 -0400 (EDT)
  • References: <200807251013.GAA11988@smc.vnet.net>

On Jul 25, 2008, at 6:13 AM, Coleman, Mark wrote:

> I've got a list of data that I'd like to Export into Excel. The twist
> is, I'd like to export each element of the list into a separate
> worksheet within the same Excel Workbook. Can this be done in  
> Mathematica v6?


v6 docs say "Import and Export by default use the  "Data" element.",  
and "Data ... [is a] list of full arrays, representing all sheets".  
So the answer is yes, confirmed by my testing. Specifically, a tensor  
with dimension S x R x C will be saved into S sheets with R rows and  
C columns. For example,

	In:= a = Table[Random[], {4}, {3}, {2}]
	Out= {
		 {{0.196065, 0.0107993}, {0.0621981, 0.149353}, {0.489958, 0.740329}},
         	 {{0.236605, 0.662268}, {0.64053, 0.553502}, {0.915333,  
0.741054}},
	         {{0.856358, 0.347337}, {0.831542, 0.126143}, {0.253758,  
0.206718}},
         	 {{0.693209, 0.839594}, {0.331732, 0.39102}, {0.416769,  
0.630923}}
	     }
	In:= Export["test.xls", a]

will produce the file "test.xls" with four sheets, each containing  
one of the lines above in a 3 x 2 cell range.

-- Andy



  • Prev by Date: How do I set PlotRegion value permantly?
  • Next by Date: Re: Cos[a x - b] displayed as Cos[b - a x]
  • Previous by thread: Export into Excel Worksheets
  • Next by thread: Re: Export into Excel Worksheets