<?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 Re: JSL for exporting/saving JMP Data Table as a CSV file without saving the Column Headers in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4621#M4621</link>
    <description>&lt;P&gt;There are text export preferences that can be set to exclude headers and save as a comma-delimited file. Many prefs can be set by JSL but not all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This JSL code works on Macintosh but should work on Windows as well (not tested). The code restores the original prefs after saving. However, if that's not important the script can be simplified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; color: #2800e1;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
// Get current prefs
current_pref = Char( Arg( Parse( (Char( Get Preferences( Export settings ) )) ), 1 ) );
// Set prefs (comma delimited, no headers)
Pref( Export Settings( End Of Field( Comma ), Export Table Headers( 0 ) ) );
// Save csv file
If(
          Host is( Windows ), dt &amp;lt;&amp;lt; save( "c:/mydata/test.txt" ),
          Host is( Macintosh ), dt &amp;lt;&amp;lt; save( "test.csv", text )
);
//Restore oribinal prefs
Eval( Parse( "pref(" || current_pref || ")" ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier;"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jun 2018 20:07:39 GMT</pubDate>
    <dc:creator>ms</dc:creator>
    <dc:date>2018-06-22T20:07:39Z</dc:date>
    <item>
      <title>JSL for exporting/saving JMP Data Table as a CSV file without saving the Column Headers</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4620#M4620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some help on some JSL, as stated in the subject of the discussion:&lt;/P&gt;&lt;P&gt;JSL for exporting/saving JMP Data Table as a CSV file without saving the Column Headers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate the help.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;ambs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 05:05:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4620#M4620</guid>
      <dc:creator>ambs</dc:creator>
      <dc:date>2012-03-20T05:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for exporting/saving JMP Data Table as a CSV file without saving the Column Headers</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4621#M4621</link>
      <description>&lt;P&gt;There are text export preferences that can be set to exclude headers and save as a comma-delimited file. Many prefs can be set by JSL but not all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This JSL code works on Macintosh but should work on Windows as well (not tested). The code restores the original prefs after saving. However, if that's not important the script can be simplified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier; color: #2800e1;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
// Get current prefs
current_pref = Char( Arg( Parse( (Char( Get Preferences( Export settings ) )) ), 1 ) );
// Set prefs (comma delimited, no headers)
Pref( Export Settings( End Of Field( Comma ), Export Table Headers( 0 ) ) );
// Save csv file
If(
          Host is( Windows ), dt &amp;lt;&amp;lt; save( "c:/mydata/test.txt" ),
          Host is( Macintosh ), dt &amp;lt;&amp;lt; save( "test.csv", text )
);
//Restore oribinal prefs
Eval( Parse( "pref(" || current_pref || ")" ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 20:07:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4621#M4621</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2018-06-22T20:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for exporting/saving JMP Data Table as a CSV file without saving the Column Headers</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4622#M4622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Worked fine on my Windows (WIN XP, JMP 9.0.2)!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;-Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 12:24:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4622#M4622</guid>
      <dc:creator>mattf</dc:creator>
      <dc:date>2012-03-20T12:24:37Z</dc:date>
    </item>
    <item>
      <title>JSL for exporting/saving JMP Data Table as a CSV file without saving the Column Headers</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4623#M4623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks MS!&lt;/P&gt;&lt;P&gt;I'm still using JMP 8.0... i encountered a few errors, but maybe it's because i'm using an old version...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for this line: current_pref = Char( Arg( Parse( (Char( Get Preferences( Export settings ) )) ), 1 ) );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this error on the log:&lt;/P&gt;&lt;P&gt;Name Unresolved: Get Preferences in access or evaluation of 'Get Preferences' , Get Preferences( Export settings )&lt;/P&gt;&lt;P&gt;In the following script, error marked by /*###*/&lt;/P&gt;&lt;P&gt;::dt = Current Data Table();&lt;/P&gt;&lt;P&gt;current_pref = Char(&lt;/P&gt;&lt;P&gt; Arg( Parse( Char( Get Preferences( Export settings ) /*###*/ ) ), 1 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but since I don't need to restore the original prefs, i just deleted this part...&lt;/P&gt;&lt;P&gt;I also removed the checking for the OS (Mac or Windows) since i'm just using windows...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I save a table as a txt file, the column header is removed... but when i save it as a csv file, the column header is still there...&lt;/P&gt;&lt;P&gt;so i guess i'll just save it as a txt file...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;again, thanks a lot!&lt;/P&gt;&lt;P&gt;cheers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards, &lt;/P&gt;&lt;P&gt;ambs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 16:03:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/4623#M4623</guid>
      <dc:creator>ambs</dc:creator>
      <dc:date>2012-03-20T16:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for exporting/saving JMP Data Table as a CSV file without saving the Column Headers</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/217237#M43423</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 00:34:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-exporting-saving-JMP-Data-Table-as-a-CSV-file-without/m-p/217237#M43423</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-07-12T00:34:28Z</dc:date>
    </item>
  </channel>
</rss>

