<?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: Import&amp;amp;modify excel worksheet from jmp table columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364872#M61430</link>
    <description>yes belive me I'm doing that. But its not good documentation for what I want to do. too general stuff. That's why we have this forum to ask things we cannot find in manual. For example in the manual it does not explain why I'm getting Column 1 , Column2 ... etc instead of real column names of the excel sheet.&lt;BR /&gt;&lt;BR /&gt;formula_Sheet = open("C:\record_table.xlsx", Worksheet Settings(&lt;BR /&gt;1,&lt;BR /&gt;Has Column Headers( 1 )))</description>
    <pubDate>Wed, 03 Mar 2021 16:20:06 GMT</pubDate>
    <dc:creator>joshua</dc:creator>
    <dc:date>2021-03-03T16:20:06Z</dc:date>
    <item>
      <title>Import&amp;modify excel worksheet from jmp table columns</title>
      <link>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364258#M61384</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to modify excel sheet with the data from jmp table. Lets say our excel sheet in this format&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joshua_0-1614668215426.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30868iA797FF74FF737FDF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joshua_0-1614668215426.png" alt="joshua_0-1614668215426.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and we want to fill columns "LabelA" and "LabelA_numbers" columns when "D/P" rows == "Driver" with "Protection" and "doors"&lt;/P&gt;&lt;P&gt;and when&amp;nbsp;"D/P" rows == "Passanger"&amp;nbsp; fill the rest of the rows of "Protection" and "Doors" to columns&amp;nbsp;"LabelB" and "LabelB_numbers".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="joshua_1-1614668422137.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30869i2A5FD69669F285FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joshua_1-1614668422137.png" alt="joshua_1-1614668422137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so the final excel sheet should look like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joshua_2-1614668849995.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30870i726F2BD23794CDD5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joshua_2-1614668849995.png" alt="joshua_2-1614668849995.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/Cars.jmp")


formula_Sheet = open("C:\record_table.xlsx",
	
	Worksheet Settings(
                                            1,
     Has Column Headers( 1 )
	
));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can we do this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Joshua&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:26:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364258#M61384</guid>
      <dc:creator>joshua</dc:creator>
      <dc:date>2023-06-10T23:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Import&amp;modify excel worksheet from jmp table columns</title>
      <link>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364275#M61387</link>
      <description>&lt;P&gt;Here is a script that gives you what you want.&amp;nbsp; I am not sure it is the approach you want to take, but given your starting point, and your described ending point, I believe it is probably the most efficient way to solve the problem.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="labels.PNG" style="width: 617px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30873iB13174394DCCDA84/image-dimensions/617x349?v=v2" width="617" height="349" role="button" title="labels.PNG" alt="labels.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cars.jmp" );

formula_Sheet = open("C:\record_table.xlsx");
//formula_Sheet = Open( "$DOCUMENTS\discussion group\record_table.jmp" );
formula_Sheet &amp;lt;&amp;lt; delete columns( {"labela", "labela_numbers", "labelb", "labelb_numbers"} );

dt &amp;lt;&amp;lt; select where( dt:name( "D/P" ) == "Driver" );
dtA = dt &amp;lt;&amp;lt; subset( invisible, columns( :Protection, :Doors ), selected rows( 1 ) );
dtA:Protection &amp;lt;&amp;lt; set name( "LabelA" );
dtA:Doors &amp;lt;&amp;lt; set name( "LabelA_numbers" );

dt &amp;lt;&amp;lt; select where( dt:name( "D/P" ) == "Passenger" );
dtB = dt &amp;lt;&amp;lt; subset( invisible, columns( :Protection, :Doors ), selected rows( 1 ) );
dtB:Protection &amp;lt;&amp;lt; set name( "LabelB" );
dtB:Doors &amp;lt;&amp;lt; set name( "LabelB_numbers" );

dtJoin1 = dtA &amp;lt;&amp;lt; Join( invisible, With( dtB ), Merge Same Name Columns,By Row Number );

Close( dtA, nosave );
Close( dtB, nosave );

dtFinal = formula_sheet &amp;lt;&amp;lt; join( with( dtJoin1 ), Merge Same Name Columns,By Row Number );

Close( dtJoin1, nosave );
Close( formula_sheet, nosave );



&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Mar 2021 08:07:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364275#M61387</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-03-02T08:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Import&amp;modify excel worksheet from jmp table columns</title>
      <link>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364709#M61421</link>
      <description>&lt;P&gt;Thanks Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all when I read the record_table.xlsx I'm getting the table like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joshua_0-1614752051806.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30918iEFCF993B05F68298/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joshua_0-1614752051806.png" alt="joshua_0-1614752051806.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and after running the script getting this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joshua_1-1614752305085.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30919iB04FFD6AEC0ACCDB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joshua_1-1614752305085.png" alt="joshua_1-1614752305085.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;one anothe thing is that lets say if I want to change City column row 2 = "panama" with "colombia" how can I do that ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 06:21:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364709#M61421</guid>
      <dc:creator>joshua</dc:creator>
      <dc:date>2021-03-03T06:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Import&amp;modify excel worksheet from jmp table columns</title>
      <link>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364710#M61422</link>
      <description>&lt;P&gt;There are several ways to make the change you are asking, but the most direct way would be&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:City[2] = "colombia";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I strongly suggest you take the time to go through the JMP Scripting Guide.&amp;nbsp; It is available in the JMP Documentation Library found under the Help pull down menu.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 06:29:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364710#M61422</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-03-03T06:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import&amp;modify excel worksheet from jmp table columns</title>
      <link>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364872#M61430</link>
      <description>yes belive me I'm doing that. But its not good documentation for what I want to do. too general stuff. That's why we have this forum to ask things we cannot find in manual. For example in the manual it does not explain why I'm getting Column 1 , Column2 ... etc instead of real column names of the excel sheet.&lt;BR /&gt;&lt;BR /&gt;formula_Sheet = open("C:\record_table.xlsx", Worksheet Settings(&lt;BR /&gt;1,&lt;BR /&gt;Has Column Headers( 1 )))</description>
      <pubDate>Wed, 03 Mar 2021 16:20:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364872#M61430</guid>
      <dc:creator>joshua</dc:creator>
      <dc:date>2021-03-03T16:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Import&amp;modify excel worksheet from jmp table columns</title>
      <link>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364877#M61431</link>
      <description>&lt;P&gt;You should use the JMP Excel Wizard to open your file once, and then go to the Source entry in the Data Tables "Table Panel" at the upper left hand side of the data table, right click on the green arrow and select Edit.&amp;nbsp; It will show you the JSL to use to properly read in the table you are reading in.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 16:34:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Import-amp-modify-excel-worksheet-from-jmp-table-columns/m-p/364877#M61431</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-03-03T16:34:20Z</dc:date>
    </item>
  </channel>
</rss>

