Re: Importing CSV (comma separated values) files?
- To: mathgroup at smc.vnet.net
- Subject: [mg13878] Re: Importing CSV (comma separated values) files?
- From: "Hossein Kazemi" <kazemi at javanet.com>
- Date: Wed, 2 Sep 1998 01:31:10 -0400
- Organization: JavaNet Cafe
- References: <6s5ok6$df4$2@dragonfly.wolfram.com>
- Sender: owner-wri-mathgroup at wolfram.com
I have a macro that does the job. Here it is: (* Read Comma-delimited file f="filename", c=#columns, r=#rows *) ReadCommaFile[f_String,c_Integer,r_Integer]:= Block[{m,x},m=OpenRead[f]; x=Table[Read[m,Record,RecordSeparators->{",","\n"}],{r},{c}];Close[f];ToExpr ession[x]] Hossein Kazemi