<?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: Open Excel within a button box - Strange behavior in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/385813#M63594</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Batch Interactive() is not documented as it is considered experimental.&amp;nbsp; However, the suggestion has been made to the JMP Development team to promote the function to full support.&amp;nbsp; I will add this discussion to that request.&amp;nbsp; The typical use case is as part of a script that is executed from an interactive action, such as clicking a button.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Documentation of the "Excel Wizard" option is included in the following locations:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;JSL Syntax Reference &lt;A href="https://www.jmp.com/support/help/en/16.0/#page/jmp/file-functions.shtml?os=win&amp;amp;source=application&amp;amp;utm_source=helpmenu&amp;amp;utm_medium=application#ww4959899" target="_self"&gt;entry for the Open() function&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Scripting Guide &lt;A href="https://www.jmp.com/support/help/en/16.0/#page/jmp/import-data.shtml" target="_self"&gt;Import Data&lt;/A&gt; section&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;I will be glad to pass along a request to include it in the Scripting Index example for opening Excel data.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 17 May 2021 13:03:55 GMT</pubDate>
    <dc:creator>Wendy_Murphrey</dc:creator>
    <dc:date>2021-05-17T13:03:55Z</dc:date>
    <item>
      <title>Open Excel within a button box - Strange behavior</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/384684#M63504</link>
      <description>&lt;P&gt;Hi. &amp;nbsp;I'm noticing that if I try to open an excel file using a script, the Excel Import Wizard appears if the Open command originates from a buttonbox, but it does not appear if the Open command is in the top-level of the script. &amp;nbsp;For the record, I do not want the wizard to appear in this case. &amp;nbsp;Is anyone familiar with this behavior, and if so, can I fix it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I have a script where the user picks an excel file, then it opens. &amp;nbsp;In this case the excel file opens as a JMP table without issue. &amp;nbsp;However, if instead I place the command to open the excel file within a buttonbox, the Excel Wizard appears. &amp;nbsp;Even if using the exact same options in both cases. &amp;nbsp;This is demonstrated in the script below, using the attached xlsx file:&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);

//Get location of file:
path = Pick File("Select xlsx Table...",,
	{"Excel|xlsx"}, 1,
	0
);
If(path == "", Stop());	

//Expression to open file:
open_exp = Expr(
	Open(path,
		Worksheets("Sheet1"),
		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(0),
			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(1),				
			Column Separator String("-")
		)
	);
);

//Attempt to open file...works as intended (no Import Wizard)
open_exp;

//Attempt to open file via a button...always results in the Import Wizard.
win = New Window("Temp",
	ButtonBox("Open xlsx",
		open_exp
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;As you can see, both methods are using the exact same command with the exact same options on the exact same file, yet I'm getting 2 different behaviors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of further note, when the xlsx file is opened via the buttonbox, the open command settings seem to be ignored. &amp;nbsp;That is, if I alter the "Number of Rows in Headers", "Headers Start on Row", "Data Starts on Row", etc options, the first method used will respect those new settings. &amp;nbsp;However the second "buttonbox" method with the Import Wizard always seems to revert to the default settings instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the record, I don't want to modify my preferences so that JMP never uses the Excel Wizard. &amp;nbsp;I just don't want to use it in this case, and I can't require other users of this app to make the same mods to their preferences.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My specifics: &amp;nbsp;&lt;/P&gt;&lt;P&gt;JMP Pro 15.2.1&lt;/P&gt;&lt;P&gt;Mac OS Catalina 10.15.7&lt;/P&gt;&lt;P&gt;Excel: Version 16.49&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone can help. &amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:46:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/384684#M63504</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2023-06-09T19:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Open Excel within a button box - Strange behavior</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/384693#M63505</link>
      <description>I do not find the same behavior on JMP 15.2  running Windows 10.  I suggest that you try adding a &lt;BR /&gt;Your Window Name &amp;lt;&amp;lt; close window &lt;BR /&gt;just before your &lt;BR /&gt;open_exp&lt;BR /&gt;and see if the behavior changes</description>
      <pubDate>Wed, 12 May 2021 22:08:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/384693#M63505</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-05-12T22:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Open Excel within a button box - Strange behavior</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/385677#M63578</link>
      <description>Hi Jim. Thanks, but no unfortunately that did not solve the problem. I'll reach out to support and see if they have some ideas.</description>
      <pubDate>Sun, 16 May 2021 19:56:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/385677#M63578</guid>
      <dc:creator>nikles</dc:creator>
      <dc:date>2021-05-16T19:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Open Excel within a button box - Strange behavior</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/385682#M63579</link>
      <description>&lt;P&gt;see &lt;LI-MESSAGE title="Ignore or disable modal JMP alerts" uid="211453" url="https://community.jmp.com/t5/Discussions/Ignore-or-disable-modal-JMP-alerts/m-p/211453#U211453" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; for the batchinteractive function. The button driven version of the script &lt;EM&gt;knows&lt;/EM&gt; you must be interactive and helpfully puts you in an interactive wizard.&lt;/P&gt;
&lt;P&gt;Also, &lt;LI-MESSAGE title="Bypass Excel Import Wizard in script" uid="238503" url="https://community.jmp.com/t5/Discussions/Bypass-Excel-Import-Wizard-in-script/m-p/238503#U238503" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; has a &lt;STRONG&gt;better answer&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, if you have the opposite issue and want the wizard, see &lt;LI-MESSAGE title="Force Open() to Use Excel Wizard Without Changing Preferences" uid="270521" url="https://community.jmp.com/t5/Discussions/Force-Open-to-Use-Excel-Wizard-Without-Changing-Preferences/m-p/270521#U270521" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5579"&gt;@Wendy_Murphrey&lt;/a&gt; both of these seem hard to discover in the documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;edit: link to &lt;A href="https://community.jmp.com/t5/Discussions/What-is-a-correct-way-to-deal-with-missing-fonts/m-p/538959/highlight/true#M76006" target="_self"&gt;odd variation with SetFont&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 01:21:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/385682#M63579</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-09-13T01:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Open Excel within a button box - Strange behavior</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/385813#M63594</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Batch Interactive() is not documented as it is considered experimental.&amp;nbsp; However, the suggestion has been made to the JMP Development team to promote the function to full support.&amp;nbsp; I will add this discussion to that request.&amp;nbsp; The typical use case is as part of a script that is executed from an interactive action, such as clicking a button.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Documentation of the "Excel Wizard" option is included in the following locations:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;JSL Syntax Reference &lt;A href="https://www.jmp.com/support/help/en/16.0/#page/jmp/file-functions.shtml?os=win&amp;amp;source=application&amp;amp;utm_source=helpmenu&amp;amp;utm_medium=application#ww4959899" target="_self"&gt;entry for the Open() function&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Scripting Guide &lt;A href="https://www.jmp.com/support/help/en/16.0/#page/jmp/import-data.shtml" target="_self"&gt;Import Data&lt;/A&gt; section&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;I will be glad to pass along a request to include it in the Scripting Index example for opening Excel data.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 13:03:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/385813#M63594</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2021-05-17T13:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Open Excel within a button box - Strange behavior</title>
      <link>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/538944#M76002</link>
      <description>&lt;P&gt;Wendy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any update on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a script that sets some fonts on my display boxes, but it turns out some of the computers in the organization have very minimal fonts installed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my users get lots of pop-ups saying "Unknown Font". Rather than revert everything to the default fonts, I tried to wrap it in Try() blocks, but it didn't help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Craige advised to use Batch Interactive(1), but it also seems to not be working, as simple example below shows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

biv = dt &amp;lt;&amp;lt; Bivariate( Y( :height ), X( :weight ) );
rbiv = biv &amp;lt;&amp;lt; Report;

For Each({box, index},  (rbiv &amp;lt;&amp;lt; XPath( "//AxisBox/MouseBox/DropBox/TextEditBox" )), 
	Batch Interactive(1);
	Try(box &amp;lt;&amp;lt; Set Font( "Agency FF", 13 ));
	Batch Interactive(0);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any idea why Batch Interactive(1) doesn't work in this case and how to deal with the missing fonts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 23:21:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-Excel-within-a-button-box-Strange-behavior/m-p/538944#M76002</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2022-08-30T23:21:04Z</dc:date>
    </item>
  </channel>
</rss>

