Re: comma delimited files for input?
- To: mathgroup at smc.vnet.net
- Subject: [mg30791] Re: [mg30774] comma delimited files for input?
- From: Dale Horton <daleh at wolfram.com>
- Date: Wed, 19 Sep 2001 00:16:30 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
At 07:43 PM 9/9/2001, 1.156 wrote:
>I'm using version 4. In order to get plain ascii decimal numbers into my
>program I have to use space delimited data files I'm told in the HELP
>files. It works fine but I have to make two versions of all the data files
>because others need comma delimited
>files of the same data.
>
>It sure would be convenient to be able to use comma delimited files (that
>import nicely into Excel) for Mathematica work. Can anyone tell me
>whether there is some guru magic that will allow importing csv files or
>does it boil down to upgrading to version 5?
>
>Thanks for any advice on the matter.
>
>Rob
If you have version 4.0,
Import[file, "Table", ConversionOptions->{"TableSeparators"->{{"\n"}, {","}}}]
If you have version 4.1,
Import[file, "CSV"]
-Dale