Just a little followup on this, maybe some Mac users might find useful.
The Applescript idea didn't work out -- not because of JSL, but because of limitations in MSExcel applescripting under OSX 10.15. (Save commands in Excel no longer work right, apparently due to sandboxing; I'm told Microsoft needs to update its Applescript support. )
Instead, I decided to script what I needed using Keyboard Maestro (KM), which is a very fine OSX scripting/macro app. (I recommend it highly -- I have no conflicts of interest.)
I wrote the script I needed in KM. Then I wrote a little JSL function that invokes a KM script:
Add Custom Functions(
New Custom Function(
"ex",
"Run KMScript",
Function( {scriptID, paramlist = {}},
{paramstring},
paramstring = Concat Items( paramlist );
Run Program(
Executable( "/usr/bin/osascript" ),
Options(
"-e tell application \!"Keyboard Maestro Engine\!" to do script \!"" || scriptID || "\!" with parameter \!"" || paramstring ||
"\!""
)
);
)
) << Prototype( "ex:Run KMScript( scriptID as string, < {param1 as string, param2 as string, etc.} > )" ) << Parameter( "String", "scriptID" ) <<
Parameter( "List", "parameter(s)" ) << Formula Category( "Utility" ) << Description(
"Runs a Keyboard Maestro script. The KM scriptID is a UUID; you can reveal and copy it by opening the 'Or trigger by shell script' text box at the top of your KM macro window. The (optional) parameters to the KM script can be retrieved inside the KM macro using the KM '%TriggerValue' token. KM receives them as a single concatenated string of space-separated values."
)
);
Right now, I'm using this within my JSL to invoke a KM macro that opens the protected Excel file in Numbers, unprotects it, saves it as csv, opens it in JMP, then closes Numbers. It works fine.
Hope somebody else might find this useful.