AMAPstudio

User Tools


This is an old revision of the document!


Excel adds double quotes around some fields during CSV file export

If you build or tune your data files with Excel, you may use its 'Save As CSV file' or 'Save As tab delimited file' feature to get a text file with a tab separator betwenn columns, which is a standard for input files in Capsis (e.g. inventory files, species files, soil compartment files, configuration or parameter files…).

The exported file may contain sections like this small extract:

#name1 name2     name3 
1      12.5      {(0,65);(1,65);(2,65)}

But sometimes, you may instead get something with extra double quotes, looking like this:

#name1 name2     name3 
1      12.5      "{(0,65);(1,65);(2,65)}"

and the file will not be read in Capsis.

This extra double quotes addition seems to be done by the 'Save As' feature in Excel. A workaround has been found to get the expected result, based on Copy and Paste, here is an example of how it can be done.

  1. Open a simple text file editor (e.g. Textpad, NotePad++, SciTE, gedit…) and create a new empty document
  1. In Excel, select the range of cells to be exported (you may try Ctrl+A to select faster the whole document to check if it works)
  1. Copy the selection in the system clipboard with Ctrl+C
  1. Paste it in the empty document in the text editor with Ctrl+V
  1. Save the resulting text file.
documentation/exceladdsdoublequotesduringcsvexport.1571994585.txt · Last modified: 2019/10/25 09:09 by coligny