<?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: How do make a table out of a string like this? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521597#M74670</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;off1 = Contains( txt, "data&amp;lt;=&amp;gt;" );&lt;BR /&gt;If( off1,&lt;BR /&gt;txt = Substr( txt, off1 + 1, Length( txt ) )&lt;BR /&gt;);&lt;BR /&gt;off2 = Contains( txt, "|", -1 );&lt;BR /&gt;If( off2,&lt;BR /&gt;txt = Substr( txt, 1, off2  )&lt;BR /&gt;);&lt;BR /&gt;t1=Substitute(txt,":","",","," ","|",",");&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Jul 2022 00:04:21 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2022-07-15T00:04:21Z</dc:date>
    <item>
      <title>How do make a table out of a string like this?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521590#M74669</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;data&amp;lt;=&amp;gt;39.85,-0.015,0.002,1.017,1.70,3.90,-1.80,-3.80,-0.28,-12257.23,15:00,218879.08|39.70,-0.000,-0.000,0.935,3.60,3.50,-2.20,-4.90,-0.65,-357.77,09:30,5039.02|39.89,-0.001,-0.000,0.907,2.80,6.60,-10.90,1.50,-0.18,-882.37,09:32,9386.96|39.85,-0.001,0.000,1.020,0.20,4.20,-7.90,3.50,-0.28,-505.97,09:33,11499.35|&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-07-15_07-47-58.png" style="width: 757px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43974i71962F191C1415D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-07-15_07-47-58.png" alt="2022-07-15_07-47-58.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:04:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521590#M74669</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-06-09T17:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do make a table out of a string like this?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521597#M74670</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;off1 = Contains( txt, "data&amp;lt;=&amp;gt;" );&lt;BR /&gt;If( off1,&lt;BR /&gt;txt = Substr( txt, off1 + 1, Length( txt ) )&lt;BR /&gt;);&lt;BR /&gt;off2 = Contains( txt, "|", -1 );&lt;BR /&gt;If( off2,&lt;BR /&gt;txt = Substr( txt, 1, off2  )&lt;BR /&gt;);&lt;BR /&gt;t1=Substitute(txt,":","",","," ","|",",");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jul 2022 00:04:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521597#M74670</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2022-07-15T00:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do make a table out of a string like this?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521683#M74673</link>
      <description>&lt;P&gt;Use Substitute Into to remove data&amp;lt;=&amp;gt; then use Words twice. First create list by splitting on "|" (rows?) and then on "," to get values for cells. Then change formats as needed and add values to datatable, for example by using data table subscripting with Add Rows.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

txt = "data&amp;lt;=&amp;gt;39.85,-0.015,0.002,1.017,1.70,3.90,-1.80,-3.80,-0.28,-12257.23,15:00,218879.08|39.70,-0.000,-0.000,0.935,3.60,3.50,-2.20,-4.90,-0.65,-357.77,09:30,5039.02|39.89,-0.001,-0.000,0.907,2.80,6.60,-10.90,1.50,-0.18,-882.37,09:32,9386.96|39.85,-0.001,0.000,1.020,0.20,4.20,-7.90,3.50,-0.28,-505.97,09:33,11499.35|";

Substitute Into(str, "data&amp;lt;=&amp;gt;", ""); // Remove "data&amp;lt;=&amp;gt;""
rows = Words(str, "|");
// example line
first_line = Words(rows[1], ",");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jul 2022 05:56:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521683#M74673</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-15T05:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do make a table out of a string like this?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521691#M74675</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-07-15_10-22-18.png" style="width: 326px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43977i381ABFEDA1D32CF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-07-15_10-22-18.png" alt="2022-07-15_10-22-18.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 06:50:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521691#M74675</guid>
      <dc:creator>lwx228</dc:creator>
      <dc:date>2022-07-15T06:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do make a table out of a string like this?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521777#M74684</link>
      <description>&lt;P&gt;Another approach. If you don't know the column names, you can leave out the columns(...) section.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;txt = "data&amp;lt;=&amp;gt;39.85,-0.015,0.002,1.017,1.70,3.90,-1.80,-3.80,-0.28,-12257.23,15:00,218879.08|39.70,-0.000,-0.000,0.935,3.60,3.50,-2.20,-4.90,-0.65,-357.77,09:30,5039.02|39.89,-0.001,-0.000,0.907,2.80,6.60,-10.90,1.50,-0.18,-882.37,09:32,9386.96|39.85,-0.001,0.000,1.020,0.20,4.20,-7.90,3.50,-0.28,-505.97,09:33,11499.35|";

Open(
    Char To Blob( Munger( txt, 1, "data&amp;lt;=&amp;gt;", "" ) ),
    columns(
        New Column( "a" ),
        New Column( "b" ),
        New Column( "c" ),
        New Column( "d" ),
        New Column( "e" ),
        New Column( "f" ),
        New Column( "g" ),
        New Column( "h" ),
        New Column( "i" ),
        New Column( "j" ),
        New Column( "time", Informat( "h:m" ), Format( "h:m" ) ),
        New Column( "z" )
    ),
    Import Settings( End Of Line( Other( "|" ) ), Labels( 0 ), Data Starts( 1 ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the first time I've used munger() and felt good about it. It looks like its failure behavior (if the data&amp;lt;=&amp;gt; text changes) will be reasonable...leaving the text as is and adding it to the first value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Opening a blob of CSV-like data using | for line end characters." style="width: 882px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43982iDF318950ED13197E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Opening a blob of CSV-like data using | for line end characters." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Opening a blob of CSV-like data using | for line end characters.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The open() function accepts a blob instead of a filename; the import settings() tells it to expect something like a .txt or .csv file in the blob.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 11:19:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-make-a-table-out-of-a-string-like-this/m-p/521777#M74684</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-07-15T11:19:28Z</dc:date>
    </item>
  </channel>
</rss>

