Re: writing mathematica data to a tab delimited file??
- To: mathgroup at smc.vnet.net
- Subject: [mg18355] Re: [mg18337] writing mathematica data to a tab delimited file??
- From: TOKIOKA <tokioka at lap.crl.melco.co.jp>
- Date: Wed, 30 Jun 1999 14:13:24 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Try this:
In[1]:=mylist=Table[{1, x}, {x, 1, 10, 1}]
In[3]:=temporal=OpenWrite["mylist.txt"];
Do[WriteString[tmp,
StringTake[
StringReplace[ToString[Part[mylist,i]],","->"\t"]
,{2,StringLength[ToString[Part[mylist,i]]]-1}],"\n"]
,{i,1, Length[mylist]}];
Close[temporal]
At 3:11 PM -0400 99.6.27, Mike wrote:
> I frequently read data into mathematica that has been given to me as a
> two column tab delimited text file. Is their some way of saving a
> mathematica list eg.
>
> mylist=Table[{1, x}, {x, 1, 10, 1}]
>
>
> as a file in a tab delimited two column format
>
> 1 1
> 1 2
> 1 3
> 1 4
>
> etc.
>
>
>
> to be read by other people in eg. excel or sigma plot?
>
> thanks
>
> Mike
------------------------------------------------------
HIDETADA TOKIOKA
Advanced Technology R&D Center
MITSUBISHI ELECTRIC CORP.
mailto:tokioka at lap.crl.melco.co.jp
------------------------------------------------------