MathGroup Archive 2007

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

Search the Archive

Re: Mathematica 6.0 CSV export with ";" as delimiter?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80788] Re: Mathematica 6.0 CSV export with ";" as delimiter?
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Sat, 1 Sep 2007 00:37:24 -0400 (EDT)

On 8/30/07 at 11:48 PM, kirk.reinholtz at jpl.nasa.gov (kirk reinholtz)
wrote:

>I find I need to Export a file from Mathematica 6.01  in CSV format,
>except I need to use semicolon for the delimiter, rather than comma.

>The documentation alludes to "many options" that might influence how
>this might be accomplished, but I can't find the options themselves.

You can find details of the options as follows:

from the Documentation Center page for Export
click the arrow for More Information
then click link "Listing of All Formats"

This will bring up the guide for importing and exporting. In 
this guide, clicking on one of the formats will bring up a page 
for that format.

In particular, entering ref/format/CSV as the search term in the 
Documentation Center will take you directly to the page for the 
CSV format.

But, none of the available options will do what you are requesting

I think the easiest way to achieve what you want would be to 
export as "CSV" then use a text editor to repacle all of the 
commas with semicolons.

If I wanted to do this entirely within Mathematica, I would try 
something like

Export[filename, 
StringReplace[ExportString[#,"CSV"],{"{"->"","}"->"",","->";"]&/@data, 
"List"]

where data contains the stuff you want exported.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: [Mathematica 6] Bug in Labeled, Center align option
  • Next by Date: Re: fit a BinomialDistribution to exptl data?
  • Previous by thread: Re: [Mathematica 6] Bug in Labeled, Center align option
  • Next by thread: Re: fit a BinomialDistribution to exptl data?