OK - most of my problems were self-inflicted as I've been attempting this from jconsole. Once I re-tried this running from the j.exe, I was much more successful. I'd forgotten that I don't have "wd" capabilities from the console.
Thanks for everyone's help - sorry to have overlooked such a basic thing. Now, if I can duplicate the functionality of the ponderous C++ behemoth before the developer can make a small change to the code, that will be a big win. Two hiccups I had while following David's directions below: I didn't know if "ThisWorkbook" was a reserved word or a filler but was successful leaving it out entirely, and I perhaps outsmarted myself by setting "JMACROS_excel_" (rather than simply "JMACROS") to the name of the workbook which meant that my first attempts at "xlshow" brought up the default "jmacros.xls". For future reference, one symptom of incorrectly running this from jconsole is that I got this error xlopen '' |domain error: wd | wd'cc xl oleautomation:Excel.Application' but no error when I ran the same "xlopen" command the same way immediately afterward. Thanks again to everyone who responded. Regards, Devon On Wed, Apr 27, 2011 at 1:43 PM, David Mitchell <[email protected]>wrote: > ... > > This works to run a macro called Main in a arbitrary Excel workbook for > me: > > 0. load xlutil.ijs > 1. set JMACROS to the fully qualified name of my workbook containing a > macro. > 2. xlopen'' > 3. xlshow 1 > 4. xlcmd'base run ThisWorkbook.Main' > > -- > David Mitchell > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
