MathGroup Archive 2012

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

Search the Archive

Error in ExportString[list,"TSV"]?

  • To: mathgroup at
  • Subject: [mg125163] Error in ExportString[list,"TSV"]?
  • From: "Alexey Popkov" <lehin.p at>
  • Date: Sat, 25 Feb 2012 01:56:45 -0500 (EST)
  • Delivered-to:


Consider the following:

In[29]:= ExportString[{{1},{2}},"TSV"]
Out[29]= 1


One can see that the resulting String expression contains two line breaks 
because it has two "newline" characters "\r" and "\n" instead of one 
character "\n". This is because the temporary file is readed backward with 
the option BinaryFormat->True:


The documentation says that BinaryFormat->True "specifies that a stream 
should be opened in binary format, so that no textual interpretation of 
newlines or other data is done." But the TSV format is a textual, not binary 

I am using CopyToClipboard@Cell[ExportString[2Dlist, "TSV"]] for copying 2D 
lists of real values from Mathematica and pasting them to an Excel 
spreadsheet. But the contents of clipboard differs from the one generated by 
Exporting 2Dlist to a TSV text file and then copying its contents to 
clipboard via Notepad (the latter does not add unnecessary line breaks)! I 
think this is at least an inconsistency, it not it?

  • Prev by Date: FindMinimum v. NMinimize and an external program
  • Next by Date: Re: Complex and Solve
  • Previous by thread: Re: FindMinimum v. NMinimize and an external program
  • Next by thread: Input[] Function Evaluation