MathGroup Archive 2013

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

Search the Archive

Re: Export with append??

  • To: mathgroup at
  • Subject: [mg129468] Re: Export with append??
  • From: "Maarten van der Burgt" <Maarten.vanderBurgt at>
  • Date: Wed, 16 Jan 2013 01:40:03 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

Dear Alexei,

Thanks for your help. Hope the Wolfram folks are reading this as well.
Something simple like this should really be an option in the function

Meanwhile I found back something similar for XLS files in my knowledge

XLAppend[oldfile_, newfile_, newdata_] :=  Module[

{sheets, olddata, completedata},

  sheets = Import[oldfile, "Sheets"];

  olddata = {#, Import[oldfile, {"Sheets", #}]} & /@ sheets;

  completedata = Join[olddata, newdata];

Export[newfile, Rule @@@ completedata]


Best regards,


Maarten van der Burgt

Product Engineering  - ICOS Division


KLA-Tencor | ICOS Division
Tel: +32 16 398220 | Direct: +32 16 398263 | Fax: +32 16 400067

KLA-TENCOR (Belgium) - Haasrode Research Park 1112 - Esperantolaan 8 -
B-3001 Leuven - BELGIUM

Mail: maarten.vanderburgt at

From: Alexei Boulbitch [mailto:Alexei.Boulbitch at]
Sent: maandag 14 januari 2013 10:22
To: mathgroup at
Cc: Maarten van der Burgt
Subject: [mg129468] Re: Export with append??


With a command like

Export["myfile.dat", results, "List" ]

is there a way to append the results to an existing myfile.dat, rather

than creating or overwriting an existing file?

thanks for your help,


Hi, Maarten,

A simple workaround is to import your file, append a new file to it and
then - to export the combined list. Assume that your mathematica
notebook entitled "trialImportExport.nb"  is situated in the same folder
as the already existing list entitled "myfile.dat".

To be precise I generated the file myfile.dat with the list:

{25, 36, 49}

in it. Assume further that I want to append the list


to it. Then the code





Does the job. The output cell below:

D:\Documents and Settings\ABo\My

shows that the file has been successfully exported.

I intentionally gave the resulting file a new name, "myfileNew.dat", to
check the result, but the old name can also be given to it.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.


ZAE Weiergewan,

11, rue Edmond Reuter,

L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566

Office fax:       +352-2454-3566

mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbitch at

  • Prev by Date: Re: neighborhood operations on image
  • Next by Date: RegularExpression::maxrec: Recursion limit exceeded; positive match
  • Previous by thread: Re: Export with append??
  • Next by thread: Re: Export with append??