Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Req: How to export Mathematica tables to Excel files?

314 views
Skip to first unread message

Neri Kafkafi

unread,
May 1, 2001, 12:19:56 AM5/1/01
to
Does anybody knows what is the best way to export from mathematica tables
that can be read by Microsoft Excel?

Thanks,
Neri


Yasvir A. Tesiram

unread,
May 2, 2001, 3:36:52 AM5/2/01
to
Hi Neri,

An example,

y=x^2 +2x
mytable=Table[y,{x,0,1,0.01}]
Export["your_filename.dat",mytable,"List"]

The example above will give you a file named "your_filename.dat" as a list
of y values from 0 to 1 in increments of 0.01 (i.e. 100 y values). The .dat
extension and the "List" format should give you what you want.

You can use SetDirectory["dir"] to where you want the file to be saved.

Paul Lutus

unread,
May 2, 2001, 3:40:14 AM5/2/01
to

"Neri Kafkafi" <NKaf...@intra.nida.nih.gov> wrote in message
news:9cldhc$1...@smc.vnet.net...

> Does anybody knows what is the best way to export from mathematica tables
> that can be read by Microsoft Excel?

You can create a comma-separated table file directly readable by Excel. Like
this:

data = Table[{x,x^2,x^3,x^4},{x,0,20}];

Export["data.csv",data];

Now read the file with Excel. Excel will know what to do.

--
Paul Lutus
www.arachnoid.com


Ronald Bruck

unread,
May 2, 2001, 3:42:36 AM5/2/01
to
In article <9cldhc$1...@smc.vnet.net>,
"Neri Kafkafi" <NKaf...@intra.nida.nih.gov> wrote:

:Does anybody knows what is the best way to export from mathematica tables


:that can be read by Microsoft Excel?

Can't you just write a filter? A Mathematica routine which will take a
table, print the numbers, putting tabs between entries in a row, and a
newline between lines? Excel can read such textfiles as tables.

You do have to be careful to evaluate things numerically; Excel wouldn't
know what to do with 3 Sqrt[2]. It doesn't even know what to do with
-2^2.

--Ron Bruck

--
Due to University fiscal constraints, .sigs may not be exceed one
line.

Ulrich Hofstoetter

unread,
May 2, 2001, 4:02:10 AM5/2/01
to

You could try Mathematica Link for Excel (AddOn Package by Wolfram),
or write the table into a csv-file (comma separated values).

Vours
Ulrich
--
Dipl.-Inf. Ulrich Hofst\166tter
Visual Analysis AG
Neumarkter Str. 87
D - 81673 M\174nchen

Tel: (+49)89-431981-38
Fax: (+49)89-431981-1
e-mail: ulrich.ho...@visualanalysis.com
www: http://www.visualanalysis.com

0 new messages