<?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: Display a File Open Dialog Box for the user to select a Excel file in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253856#M49844</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Pick File()
dt2 = Pick FIle()
New SQL Query(
	Version( 130 ),
	Connection( "JMP" ),
	JMP Tables(
		["Limits" =&amp;gt;
		"Source(Open(
	\!"dt\!",
	Worksheets( \!"Limits\!" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( \!"-\!" )
	)
))",
		"SummaryTable" =&amp;gt; "dt2"
		
		]
	),
	QueryName( "SummaryTable" ),
	Select(
		Column( "Test Number", "t2" ),
		Column( "Test Name", "t2" ),
		Column( "Test Units", "t2" ),
		Column( "LL", "t2" ),
		Column( "UL", "t2" ),
		Column( "N", "t2" ),
		Column( "Failing Soft Bin", "t1" )
	),
	From(
		Table( "Limits", Alias( "t1" ) ),
		Table(
			"SummaryTable",
			Alias( "t2" ),
			Join(
				Type( Left Outer ),
				EQ( Column( "Test Number", "t2" ), Column( "Test Number", "t1" ) )
				 &amp;amp; EQ( Column( "Test Name", "t2" ), Column( "Test Name", "t1" ) ) &amp;amp;
				EQ( Column( "Test Units", "t2" ), Column( "Test Units", "t1" ) )
			)
		)
	)
)
&amp;lt;&amp;lt; Run&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I used two&amp;nbsp;&lt;SPAN&gt;Pick File() functions, one after another, with the first one selecting the xlsx and then the second, selecting the jmp file.&amp;nbsp;Then substitute into the script. Getting errors&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2020 19:54:47 GMT</pubDate>
    <dc:creator>Jackie_</dc:creator>
    <dc:date>2020-03-23T19:54:47Z</dc:date>
    <item>
      <title>Display a File Open Dialog Box for the user to select a Excel file</title>
      <link>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253486#M49758</link>
      <description>&lt;P&gt;I created a SQL script using JMP SQL Builder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
New SQL Query(
	Version( 130 ),
	Connection( "JMP" ),
	JMP Tables(
		["Limits" =&amp;gt;
		"Source(Open(
	\!"C:\Jay\JMP\JMP Scripts\Python Scripts\JMP scripts\New folder\New folder\SQL 2\Limits.xlsx\!",
	Worksheets( \!"Limits\!" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( \!"-\!" )
	)
))",
		"SummaryTable" =&amp;gt;
		"\C:\Jay\JMP\JMP Scripts\Python Scripts\JMP scripts\New folder\New folder\SQL 2\SummaryTable.jmp"
		]
	),
	QueryName( "SQLQuery11" ),
	Select(
		Column( "Test Number", "t2" ),
		Column( "Test Name", "t2" ),
		Column( "Test Units", "t2" ),
		Column( "LL", "t2" ),
		Column( "UL", "t2" ),
		Column( "N", "t2" ),
		Column( "Failing Soft Bin", "t1" )
	),
	From(
		Table( "Limits", Alias( "t1" ) ),
		Table(
			"SummaryTable",
			Alias( "t2" ),
			Join(
				Type( Left Outer ),
				EQ( Column( "Test Number", "t2" ), Column( "Test Number", "t1" ) )
				 &amp;amp; EQ( Column( "Test Name", "t2" ), Column( "Test Name", "t1" ) ) &amp;amp;
				EQ( Column( "Test Units", "t2" ), Column( "Test Units", "t1" ) )
			)
		)
	)
) &amp;lt;&amp;lt; Run&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above script does the task of copying a column but I how can I display a File Open Dialog Box for the user to select a Excel file and JMP file after running the script?&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every time I have to change the directory path in the script if I run the script on other files. Does JMP Query Builder has any syntax to display a file open Dialog box?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 19:47:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253486#M49758</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-20T19:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Display a File Open Dialog Box for the user to select a Excel file</title>
      <link>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253502#M49760</link>
      <description>&lt;P&gt;I am not sure I am answering what you want, but you can run 2 Pick File() functions, one after another, with the first one selecting the xlsx and then the second, selecting the jmp file.&amp;nbsp; Then substitute into your script, and run the code.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 21:33:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253502#M49760</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-20T21:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Display a File Open Dialog Box for the user to select a Excel file</title>
      <link>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253856#M49844</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Pick File()
dt2 = Pick FIle()
New SQL Query(
	Version( 130 ),
	Connection( "JMP" ),
	JMP Tables(
		["Limits" =&amp;gt;
		"Source(Open(
	\!"dt\!",
	Worksheets( \!"Limits\!" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( \!"-\!" )
	)
))",
		"SummaryTable" =&amp;gt; "dt2"
		
		]
	),
	QueryName( "SummaryTable" ),
	Select(
		Column( "Test Number", "t2" ),
		Column( "Test Name", "t2" ),
		Column( "Test Units", "t2" ),
		Column( "LL", "t2" ),
		Column( "UL", "t2" ),
		Column( "N", "t2" ),
		Column( "Failing Soft Bin", "t1" )
	),
	From(
		Table( "Limits", Alias( "t1" ) ),
		Table(
			"SummaryTable",
			Alias( "t2" ),
			Join(
				Type( Left Outer ),
				EQ( Column( "Test Number", "t2" ), Column( "Test Number", "t1" ) )
				 &amp;amp; EQ( Column( "Test Name", "t2" ), Column( "Test Name", "t1" ) ) &amp;amp;
				EQ( Column( "Test Units", "t2" ), Column( "Test Units", "t1" ) )
			)
		)
	)
)
&amp;lt;&amp;lt; Run&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I used two&amp;nbsp;&lt;SPAN&gt;Pick File() functions, one after another, with the first one selecting the xlsx and then the second, selecting the jmp file.&amp;nbsp;Then substitute into the script. Getting errors&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:54:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253856#M49844</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-23T19:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Display a File Open Dialog Box for the user to select a Excel file</title>
      <link>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253860#M49847</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17878"&gt;@Jackie_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You have some syntax errors including missing semicolons after each of your pick statements. Please start to read the scripting guide or refer to the scripting index for additional details on the use of the Pick function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try the following script which will prompt to open an Excel file and then prompt to open a JMP data table to use in the query before performing the &amp;nbsp;join. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A word of caution when running the query on the two opened tables;&amp;nbsp;the script will only work if the existing data tables have the respective columns in each of the opened data tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
//Prompt to select and open an MS Excel file
dt1 = Open( Pick File( "Select Excel File", "$DOCUMENTS", {"Excel Files|csv;xlsx;xls", "All Files|*"}, 1, 0 ), Invisible );

//Prompt to select an open a JMP data table
dt2 = Open( Pick File( "Select JMP File", "$DOCUMENTS", {"JMP Files|jmp", "All Files|*"}, 1, 0 ), Invisible );

//Perform a left outer join on the tables using the "Name" Column
New SQL Query(
	Version( 130 ),
	Connection( "JMP" ),
	JMP Tables(
		["1st_file" =&amp;gt;
		"Source(Open( \!"dt1\!",
	Worksheets( \!"worksheet\!" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 1 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( \!"-\!" )
	)
))",
		"2nd_file" =&amp;gt; "Source(Open( \!"dt2\!"))"]
	),
	QueryName( "Data_Blending" ),
	Select(
		Column( "Name", "t2" ),
		Column( "Enable", "t2" ),
		Column( "Type", "t2" ),
		Column( "Phase", "t2" ),
		Column( "Values", "t3" )
	),
	From(
		Table( "2nd_file", Alias( "t2" ) ),
		Table(
			"1st_file",
			Alias( "t3" ),
			Join(
				Type( Left Outer ),
				EQ( Column( "Name", "t2" ), Column( "Name", "t3" ) )
			)
		)
	)
) &amp;lt;&amp;lt; Run;

//Close source files without saving
Close(dt1, "NoSave");
Close(dt2, "NoSave") &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;cheers,&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 22:14:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/253860#M49847</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2020-03-23T22:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Display a File Open Dialog Box for the user to select a Excel file</title>
      <link>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/254025#M49874</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/706"&gt;@stan_koprowski&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help. The script will only run if the following file name matches&amp;nbsp;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&lt;BR /&gt;&lt;DIV class="lia-progress-placeholder mceNonEditable"&gt;&lt;DIV class="lia-media-progress"&gt;&lt;DIV class="lia-progress-bar-stripes lia-progress-bar-animate lia-media-progress-bar"&gt;&lt;DIV class="lia-progress-bar"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;SPAN class="lia-progress-value"&gt;Updating Media&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;What if I want to run the same script on different files ? Let's my 2nd file name remains constant and I want to perform similar operations on different files. I have multiple excel file with different name(All files have same columns)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 18:56:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/254025#M49874</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-24T18:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Display a File Open Dialog Box for the user to select a Excel file</title>
      <link>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/254027#M49875</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jacksmith12_0-1585076254812.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22529iE4E41A8A77829F45/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jacksmith12_0-1585076254812.png" alt="Jacksmith12_0-1585076254812.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 18:57:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Display-a-File-Open-Dialog-Box-for-the-user-to-select-a-Excel/m-p/254027#M49875</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-24T18:57:45Z</dc:date>
    </item>
  </channel>
</rss>

