Re: Help needed with new Export (v. 6)
- To: mathgroup at smc.vnet.net
- Subject: [mg84276] Re: Help needed with new Export (v. 6)
- From: dh <dh at metrohm.ch>
- Date: Mon, 17 Dec 2007 03:05:07 -0500 (EST)
- References: <fhh7uo$92p$1@smc.vnet.net> <fk2v94$ncj$1@smc.vnet.net>
Hi Curtis,
the format "List" writes one number / line. As "LineTerminators" is by
default set to new-line, you have to change this to space:
Export[FileName, Data, "List", "LineSeparators" -> " "]
hope this helps, Daniel
C.O. wrote:
> I'm taking the desperate step of doing a *bump* on this message, as
> I've yet to find an answer. Is there now a way to use "Export" to
> write a list of numbers to a file which has, say, spaces as delimeters
> rather than tabs (as in TSV) or commas (as in CSV)? I was able to do
> it easily in version 5, without doing any string manipulation.
>
> I've read the documentation for v. 6's Export and CSV quite
> extensively, and am too dense to figure it out. Perhaps someone could
> post a code snippet?
>
> Thanks,
> C.O.
>
>
>
> On Nov 15, 3:44 am, Curtis Osterhoudt <c... at lanl.gov> wrote:
>> Hi, all,
>>
>> In v. 5, I used a Mathematica function to import .fig files, do some
>> manipulation to them, and then export the files again. The only way I could
>> find to retain the proper formatting of the .fig files was to use the
>> ConversionOptions option in Export; the relevant part of the code is
>> something like:
>>
>> Export[ newFileName, myNewExpression, "CSV",
>> ConversionOptions->{"FieldSeparator" -> " "}]
>>
>> where "CSV" was used because it somehow keptXFighappy with the results, and
>> the commas are replaced with spaces. "Table" does not work as an export
>> format, asXFigneeds single spaces between most of the exported values.
>>
>> It seems that the new version of Mathematica does not like
>> ConversionOptions, as the Help entry says "As of Version 6.0,
>> ConversionOptions is superseded by capabilities in Import and Export."
>> However, I can't figure out what new capabilities might replace my old
>> behavior. Is there a quick way to fix my old function, or am I going to have
>> to go through the stream operation tango?
>>
>> Thanks,
>> C.O.
>> --
>> ==========================================================
>> Curtis Osterhoudt
>> cfo at remove_this.lanl.and_this.gov
>> PGP Key ID: 0x4DCA2A10
>> Please avoid sending me Word or PowerPoint attachments
>> Seehttp://www.gnu.org/philosophy/no-word-attachments.html
>> ==========================================================
>
>