MathGroup Archive 2007

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

Search the Archive

Re: export data to spreadsheet

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79247] Re: export data to spreadsheet
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sun, 22 Jul 2007 04:18:17 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <200707190742.DAA02209@smc.vnet.net> <f7shj0$2g$1@smc.vnet.net>

Martin Channon wrote:
> Greetings folks, this is my first time here. I don't use Mathematica 
> very often, so I don't know the it very well, and I'm stumped on 
> something that is probably pretty basic. Can anyone tell me how to 
> export table data to a spreadsheet? Thanks.

Hi Martin,

The easiest way of doing that would be to *Export* your data in s comma 
delimited file.

Say we have a four by two array of integer values called data.

data = {{-211, 106}, {-245, -193}, {25, -22}, {-204, 11}};

Using the built-in function *Export*, we create a comma delimited file 
called myfile.csv

Export["myfile.csv", data]

I everything went well, Mathematica returns the name of the freshly 
created file

"myfile.csv"

If you are not sure in which directory the file has been created, just 
evaluate the following command

Directory[]

On my Wintel machine, Mathematica returns my default user document directory

"C:\\Documents and Settings\\Jean-Marc\\Mes documents"

Then, you are ready to import your data within your spreadsheet program.

Regards,
Jean-Marc



  • Prev by Date: Re: Re: export data to spreadsheet
  • Next by Date: Re: create a List in a Do loop
  • Previous by thread: Re: Re: export data to spreadsheet
  • Next by thread: Re: fast way of appending x zeros to a list?