<?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 Print a list and export as txt file in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Print-a-list-and-export-as-txt-file/m-p/532298#M75533</link>
    <description>&lt;P&gt;Would this be possible with JSL?&lt;/P&gt;&lt;P&gt;For convenience sake I would like it to be printed out into a seperate txt file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scuffed solution would be to print it into the debug log which would also work but you'd have to go into the debug mode everytime you want to look up something.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
L = dt &amp;lt;&amp;lt; Get Column Names(String);
for(i = 1, i &amp;lt; N items(L)+1, i++,
Print(L[i],i); // prints the string in the list and it's position next to it
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 09 Jun 2023 17:07:15 GMT</pubDate>
    <dc:creator>Lien</dc:creator>
    <dc:date>2023-06-09T17:07:15Z</dc:date>
    <item>
      <title>Print a list and export as txt file</title>
      <link>https://community.jmp.com/t5/Discussions/Print-a-list-and-export-as-txt-file/m-p/532298#M75533</link>
      <description>&lt;P&gt;Would this be possible with JSL?&lt;/P&gt;&lt;P&gt;For convenience sake I would like it to be printed out into a seperate txt file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My scuffed solution would be to print it into the debug log which would also work but you'd have to go into the debug mode everytime you want to look up something.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
L = dt &amp;lt;&amp;lt; Get Column Names(String);
for(i = 1, i &amp;lt; N items(L)+1, i++,
Print(L[i],i); // prints the string in the list and it's position next to it
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:07:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Print-a-list-and-export-as-txt-file/m-p/532298#M75533</guid>
      <dc:creator>Lien</dc:creator>
      <dc:date>2023-06-09T17:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Print a list and export as txt file</title>
      <link>https://community.jmp.com/t5/Discussions/Print-a-list-and-export-as-txt-file/m-p/532307#M75534</link>
      <description>&lt;P&gt;This script will write the column names to the JMP Log, and then will save it to a text file&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
L = dt &amp;lt;&amp;lt; Get Column Names( String );
theText = "";
For( i = 1, i &amp;lt; N Items( L ) + 1, i++,
	Write( L[i] || " " || Char( i ) || "\!n" );
	theText = theText || L[i] || " " || Char( i ) || "\!n";
);
Save Text File( "path/filename.txt", theText );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Aug 2022 12:00:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Print-a-list-and-export-as-txt-file/m-p/532307#M75534</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-08-10T12:00:52Z</dc:date>
    </item>
  </channel>
</rss>

