<?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 Script for add-in to allow user pick file in a directory in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Script-for-add-in-to-allow-user-pick-file-in-a-directory/m-p/610054#M81102</link>
    <description>&lt;P&gt;Hello JMP expert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want to build an add-in that can ask user to put file of interest (i.e import .xlsx file into .jmp) then only the rest of script will run.&lt;/P&gt;&lt;P&gt;I have many files in the main folder.&lt;/P&gt;&lt;P&gt;How do i change below script to be able the user pick the directory in "C:\User\Data" folder at the first place?&lt;/P&gt;&lt;P&gt;I've tried to use pick file &amp;amp; pick directory within the () but not working. may be I messed-up something&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;This is JMP 17&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Open  Table
dt1= Open(
	"C:\User\Data\PlatingToneDatasheet.xlsx",
	Worksheets( {"Merge1"} ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 1 ),
	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( "-" )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 16:30:22 GMT</pubDate>
    <dc:creator>WebDesignesCrow</dc:creator>
    <dc:date>2023-06-08T16:30:22Z</dc:date>
    <item>
      <title>Script for add-in to allow user pick file in a directory</title>
      <link>https://community.jmp.com/t5/Discussions/Script-for-add-in-to-allow-user-pick-file-in-a-directory/m-p/610054#M81102</link>
      <description>&lt;P&gt;Hello JMP expert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I want to build an add-in that can ask user to put file of interest (i.e import .xlsx file into .jmp) then only the rest of script will run.&lt;/P&gt;&lt;P&gt;I have many files in the main folder.&lt;/P&gt;&lt;P&gt;How do i change below script to be able the user pick the directory in "C:\User\Data" folder at the first place?&lt;/P&gt;&lt;P&gt;I've tried to use pick file &amp;amp; pick directory within the () but not working. may be I messed-up something&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;This is JMP 17&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Open  Table
dt1= Open(
	"C:\User\Data\PlatingToneDatasheet.xlsx",
	Worksheets( {"Merge1"} ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 1 ),
	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( "-" )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:30:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-for-add-in-to-allow-user-pick-file-in-a-directory/m-p/610054#M81102</guid>
      <dc:creator>WebDesignesCrow</dc:creator>
      <dc:date>2023-06-08T16:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script for add-in to allow user pick file in a directory</title>
      <link>https://community.jmp.com/t5/Discussions/Script-for-add-in-to-allow-user-pick-file-in-a-directory/m-p/610087#M81105</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Pick File()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;needs to be executed prior to the Open().&lt;/P&gt;
&lt;P&gt;Below is an example of how to get what you&amp;nbsp; specified&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Open  Table
Names Default To Here( 1 );
file = Pick File(
	"Select the Excel file to input",
	"$DOCUMENTS",
	{"Excel Files|xlsx;xlsm;xls", "All Files|*"},
	1,
	0
);
If( file != "",
	dt1 = Open(
		file,
		Worksheets( {"Merge1"} ),
		Use for all sheets( 1 ),
		Concatenate Worksheets( 1 ),
		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( "-" )
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Pick File() function is well documented along with an example in the Scripting Index.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 12:58:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-for-add-in-to-allow-user-pick-file-in-a-directory/m-p/610087#M81105</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-09T12:58:22Z</dc:date>
    </item>
  </channel>
</rss>

