MathGroup Archive 1998

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

Search the Archive

Re: Importing CSV (comma separated values) files?


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





  • Prev by Date: MathFonts with MiKTeX 1.11 and Win32
  • Next by Date: Re: Lissajous W (was Re: Looking for Contractor)
  • Previous by thread: MathFonts with MiKTeX 1.11 and Win32
  • Next by thread: Re: Lissajous W (was Re: Looking for Contractor)