<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to Export a data table to a CSV where all data values are in double quotes in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/28908#M19233</link>
    <description>&lt;P&gt;Is there a way to change the export settings so that all values in the resulting CSV file are enclosed with double quotes?&lt;/P&gt;&lt;P&gt;Current output example: 1000,AA,Room,8,Center,...&lt;/P&gt;&lt;P&gt;Desired output example: "1000","AA","Room","8","Center",...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I pulled this script from a related post, but can't seem to find the correct settings to make it work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt = Current Data Table();
// Get current prefs
current_pref = Char( Arg( Parse( (Char( Get Preferences( Export settings ) )) ), 1 ) );
show(current_pref);
// Set prefs (comma delimited, quotes, keep headers)
Pref( Export Settings( End Of Field( double quote, CSV(0) ), Export Table Headers( 1 ) ) ); //what settings here would give the double quotes?
// Save csv file
dt &amp;lt;&amp;lt; save( "$Desktop\test.csv" );
//Restore original prefs
Eval( Parse( "pref(" || current_pref || ")" ) );&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2016 17:40:03 GMT</pubDate>
    <dc:creator>ckerr</dc:creator>
    <dc:date>2016-11-08T17:40:03Z</dc:date>
    <item>
      <title>How to Export a data table to a CSV where all data values are in double quotes</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/28908#M19233</link>
      <description>&lt;P&gt;Is there a way to change the export settings so that all values in the resulting CSV file are enclosed with double quotes?&lt;/P&gt;&lt;P&gt;Current output example: 1000,AA,Room,8,Center,...&lt;/P&gt;&lt;P&gt;Desired output example: "1000","AA","Room","8","Center",...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I pulled this script from a related post, but can't seem to find the correct settings to make it work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt = Current Data Table();
// Get current prefs
current_pref = Char( Arg( Parse( (Char( Get Preferences( Export settings ) )) ), 1 ) );
show(current_pref);
// Set prefs (comma delimited, quotes, keep headers)
Pref( Export Settings( End Of Field( double quote, CSV(0) ), Export Table Headers( 1 ) ) ); //what settings here would give the double quotes?
// Save csv file
dt &amp;lt;&amp;lt; save( "$Desktop\test.csv" );
//Restore original prefs
Eval( Parse( "pref(" || current_pref || ")" ) );&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 17:40:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/28908#M19233</guid>
      <dc:creator>ckerr</dc:creator>
      <dc:date>2016-11-08T17:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Export a data table to a CSV where all data values are in double quotes</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/28909#M19234</link>
      <description>&lt;P&gt;The Export Preferences in JMP are quite limited.&amp;nbsp; I am not aware of a Double Quote option.&amp;nbsp; However, a work around is to add the quotes into the character columns before the export.&amp;nbsp; That should give you what you want.&amp;nbsp; Below is a simple script that you can expand on to set the preceeding and following quotes.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=current data table();
for each row(
	:region = "\!""||:region||"\!"";
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Nov 2016 18:10:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/28909#M19234</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-11-08T18:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Export a data table to a CSV where all data values are in double quotes</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/28910#M19235</link>
      <description>The very thing for it!&lt;BR /&gt;In testing it out I'm finding that any numeric &amp;amp; continuous columns needed to be assigned to character &amp;amp; nominal FIRST, but then it works just fine.</description>
      <pubDate>Tue, 08 Nov 2016 18:23:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/28910#M19235</guid>
      <dc:creator>ckerr</dc:creator>
      <dc:date>2016-11-08T18:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Export a data table to a CSV where all data values are in double quotes</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/251921#M49468</link>
      <description>&lt;P&gt;Anyone landing here: preferences were added for this a while back; JMP 15, 14 (and perhaps 13?) have this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 516px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22301i5B99945EDAA5EB3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All these preferences can do is force JMP to add the extra quotation marks even if not strictly needed. The preferences can't make JMP remove the quotation marks that are needed to prevent ambiguity; fields containing commas, quotation marks, and newlines need quotation marks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 00:30:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-Export-a-data-table-to-a-CSV-where-all-data-values-are-in/m-p/251921#M49468</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-03-12T00:30:17Z</dc:date>
    </item>
  </channel>
</rss>

