MathGroup Archive 2005

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

Search the Archive

Re: Outputing a tabular function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54975] Re: [mg54945] Outputing a tabular function
  • From: Adam Getchell <agetchell at physics.ucdavis.edu>
  • Date: Tue, 8 Mar 2005 05:04:25 -0500 (EST)
  • References: <200503070710.CAA07734@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Clifford Martin wrote:

>In some code I've written I output a table. In
>Mathematica I use TableForm in the usual way then use
>columns of data to fill the table. It looks nice in
>Mathematica. But my customer wants to be able to pull
>the file up in Excel.  I've tried various export
>formats but since the tables are made up of columns of
>data that are just lists it writes the lists as rows 
>Any suggestions about exporting the data so it can be
>read in an external program and look like a table? (I
>should add that I iterate over many sets of data and
>so there are multiple tables that print out. I capture
>the data in a function that I try to Export). Any
>suggestions appreciated.
>
>Cliff
>  
>
I've been exporting into comma separated values, which, for a matrix, 
actually separates by tabs, then importing into Excel just fine.

For example:

In[25]:=
Export["djia-results.txt",
   results2, "csv",
   ConversionOptions ->
    {"TableHeadings" ->
      {None, Range[minYear,
        maxYear]}}];

You can leave off the ConversionOptions; I added them because I had 
columns of stock data which I wanted to decorate with the year for 
inspection (although doing actual number crunching the year is 
unimportant as long as all the values for a given year are in the same 
column).

Then import from Excel.

Adam Getchell



  • Prev by Date: Re: Help on iteration
  • Next by Date: Re: repeating elements in a list
  • Previous by thread: Re: Outputing a tabular function
  • Next by thread: Re: Outputing a tabular function