JMP は Excel.xlsm ファイルを起動できますか?JMP jsl は Excel .xlsm (マクロ化された) ファイルを「起動」できますか。基本的にファイルを「ダブルクリック」して開き、インポートは試行しません。
Excel マクロは JMP ODBC 抽出ツールよりも 100 倍高速であるため、データベース抽出に Excel マクロを使用しており、マクロ化されたファイルを JSL コードで実行したいと考えています。
前もって感謝します!
データアクセスRe: JMP は Excel.xlsm ファイルを起動できますか?これは完璧で、魔法のように機能します。
@ih 、 ご協力いただきありがとうございます。
Re: JMP は Excel.xlsm ファイルを起動できますか?おっと、最後の行のファイル拡張子を見逃していました。
/* 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 "& {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")Re: JMP は Excel.xlsm ファイルを起動できますか?このエラーが発生しました。どう思いますか?
「Start-Process : エラーのため、このコマンドは実行できません: システムは指定されたファイルを見つけることができません。
行:1 文字:4
+ & {プロセスの開始 'C:\Users\Me\Desktop\test'}
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ カテゴリ情報 : InvalidOperation: (:) [プロセス開始]、InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException、Microsoft.PowerShell.Commands.StartProcessCommand
」
Re: JMP は Excel.xlsm ファイルを起動できますか?これを試してみてください:
/* 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 "& {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")Re: JMP は Excel.xlsm ファイルを起動できますか?「C:\Users\Me\Desktop\」にある「Test.xlsx」というファイルを開きたいとします。コードはどのようになりますか?
次のことを試しましたが、うまくいかないようです。
rp0 = Run Program(
Executable( "Excel.EXE" ),
Options("C:\Users\Me\Desktop\test"),
Read Function("text")
);Re: JMP は Excel.xlsm ファイルを起動できますか?全員が Windows を使用しているか、Powershell がインストールされていることがわかっている場合は、「プログラムの実行」を使用して、OS によって定義されたデフォルトのプログラムを使用してファイルを開くことができます。
オペレーティング システムのデフォルト プログラムでファイルを開く
Re: JMP は Excel.xlsm ファイルを起動できますか?ありがとう@txnelson 、しかし、これが答えであるかどうかはわかりません。「Excel.exe:」が他の人のコンピュータ上のどこに保存されているかわからない場合、自分のスクリプトを他の人と共有するにはどうすればよいですか?
Re: JMP は Excel.xlsm ファイルを起動できますか?機能を見る

スクリプトインデックス内