<?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 Can JMP launch an excel.xlsm file? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390252#M64037</link>
    <description>&lt;P&gt;Is JMP jsl able to "launch" an Excel .xlsm (macro'ed) file, such that it essentially "double clicks" the file to open it and does not try to import it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using an Excel macro for database extraction because it is 100X faster than the JMP ODBC extraction tool and would like my jsl code to run the macro'ed file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 19:48:29 GMT</pubDate>
    <dc:creator>Martin</dc:creator>
    <dc:date>2023-06-09T19:48:29Z</dc:date>
    <item>
      <title>Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390252#M64037</link>
      <description>&lt;P&gt;Is JMP jsl able to "launch" an Excel .xlsm (macro'ed) file, such that it essentially "double clicks" the file to open it and does not try to import it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using an Excel macro for database extraction because it is 100X faster than the JMP ODBC extraction tool and would like my jsl code to run the macro'ed file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:48:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390252#M64037</guid>
      <dc:creator>Martin</dc:creator>
      <dc:date>2023-06-09T19:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390398#M64050</link>
      <description>&lt;P&gt;See the function&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="runprogram.PNG" style="width: 411px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33268i9CCDD4309B401C9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="runprogram.PNG" alt="runprogram.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;in the Scripting Index&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 11:10:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390398#M64050</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-06-04T11:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390460#M64057</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;, but I am not sure this is the answer.&amp;nbsp; If I do not know where the "Excel.exe:" is kept on someone else's computer, how can I share my script with others?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 14:08:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390460#M64057</guid>
      <dc:creator>Martin</dc:creator>
      <dc:date>2021-06-04T14:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390780#M64087</link>
      <description>&lt;P&gt;If you know everyone is on windows or has Powershell installed you can use Run Program to open the file using the default program defined by the OS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Open a file in the operating system default program" uid="246050" url="https://community.jmp.com/t5/JSL-Cookbook/Open-a-file-in-the-operating-system-default-program/m-p/246050#U246050" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 21:27:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/390780#M64087</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-06-04T21:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391213#M64150</link>
      <description>&lt;P&gt;Let's say I want to open a file called "Test.xlsx" that is located at "C:\Users\Me\Desktop\".&amp;nbsp; What would the code look like?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried the following but it does not seem to work:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;rp0 = Run Program(
	Executable( "Excel.EXE" ),
	Options("C:\Users\Me\Desktop\test"),
	Read Function("text")
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Jun 2021 13:32:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391213#M64150</guid>
      <dc:creator>Martin</dc:creator>
      <dc:date>2021-06-07T13:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391254#M64157</link>
      <description>&lt;P&gt;Give this a try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/* 	Function: openFileInOSDefault
		Open file in the operating system default program
		
		Include this once at the top of your script
		
	Arguments: 
		filepath - local path file
*/
openFileInOSDefault = Function({filepath},
	If( Host is( "Windows" ),
		Run Program(
			Executable( "PowerShell.exe" ),
			Options(
				Eval Insert( "\[-Command "&amp;amp; {Start-Process '^filepath^'}"]\" )
			),
			Read function( "text" )
		);
	,
		RunProgram(
			Executable( "/usr/bin/open" ),
			Options( filepath ),
			ReadFunction( "text" )
		)
	);
);

//Now in your script you can just call the function
openFileInOSDefault("C:\Users\Me\Desktop\test")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Jun 2021 14:23:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391254#M64157</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-06-07T14:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391365#M64170</link>
      <description>&lt;P&gt;I get this error, thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Start-Process : This command cannot be run due to the error: The system cannot find the file specified.&lt;BR /&gt;At line:1 char:4&lt;BR /&gt;+ &amp;amp; {Start-Process 'C:\Users\Me\Desktop\test'}&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException&lt;BR /&gt;+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand&lt;BR /&gt;&lt;BR /&gt;"&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 18:22:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391365#M64170</guid>
      <dc:creator>Martin</dc:creator>
      <dc:date>2021-06-07T18:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391585#M64195</link>
      <description>&lt;P&gt;Woops, I missed the file extension in the last line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;/* 	Function: openFileInOSDefault
		Open file in the operating system default program
		
		Include this once at the top of your script
		
	Arguments: 
		filepath - local path file
*/
openFileInOSDefault = Function({filepath},
	If( Host is( "Windows" ),
		Run Program(
			Executable( "PowerShell.exe" ),
			Options(
				Eval Insert( "\[-Command "&amp;amp; {Start-Process '^filepath^'}"]\" )
			),
			Read function( "text" )
		);
	,
		RunProgram(
			Executable( "/usr/bin/open" ),
			Options( filepath ),
			ReadFunction( "text" )
		)
	);
);

//Now in your script you can just call the function
openFileInOSDefault("C:\Users\Me\Desktop\test.xlsx")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jun 2021 11:35:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391585#M64195</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-06-08T11:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP launch an excel.xlsm file?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391614#M64198</link>
      <description>&lt;P&gt;This is perfect and works like a charm!&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/6657"&gt;@ih&lt;/a&gt;, thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 12:44:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-launch-an-excel-xlsm-file/m-p/391614#M64198</guid>
      <dc:creator>Martin</dc:creator>
      <dc:date>2021-06-08T12:44:33Z</dc:date>
    </item>
  </channel>
</rss>

