Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: How can export {1,5,9} into a TXT file as the format as 1 5 9?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31213] Re: How can export {1,5,9} into a TXT file as the format as 1 5 9?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 19 Oct 2001 03:12:03 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9qjk14$j8l$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Put[] ist to save complete Mathematica expressions.
But:


myWriteAppend[fname_String, lst_List] :=
  Module[{f},
    f = OpenAppend[fname, FormatType -> StandardForm];
    Write[f, Infix[lst, " "]];
    Close[f];
    ]


and

In[]:=myWriteAppend["data.txt", {1, 2, 3}];
      myWriteAppend["data.txt", {4, 5, 6}];


In[]:=!!data.txt

1 2 3
4 5 6


will work.

Regards
  Jens

liwen liwen wrote:
> 
> Hi;
> 
> I encounter such problem during exporting data to TXT
> file.
> I want to export pt={1,5,9} to a TXT file.
> I use pt>>>data.txt to do it, but the result is
> "{1,5,9}", not the format as "1  5  9" that I
> expected.
> How can I achieve it?
> 
> Thank you very much.
> 
> Liwen
> 
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com


  • Prev by Date: Zero does not Equal Zero
  • Next by Date: Re: Solve bug !!
  • Previous by thread: Re: How can export {1,5,9} into a TXT file as the format as 1 59?
  • Next by thread: Limit and Abs