Yeah, there's at least one example of using multiple extensions I saw. BUT, I have switched gears a bit.
I took the original global class and added an "Excel" member. I created the set and get routines and it works fine. It works ALMOST exactly as you described. I simply have to add "global." in front of my current Excel manipulations, whatever they may be.
Everything is working fine, but now my problem is that I can't shut off the Excel process. So, I have this:
var Excel ;
function excel_state(state, path, worksheet)
{
if(state=='open')
{
Excel = Sys.OleObject("Excel.Application") ;
Excel.Workbooks.Open(path).Worksheets(worksheet).Activate;
}
if(state=='close')
{
Excel.displayalerts = false;
Excel.SaveWorkspace();
Excel.displayalerts = true ;
Excel.quit();
//Sys.OleObject("Excel.Application").quit() ;
}
} // excel_state()
Excel simply refuses to shut off whenever I perform the following in the main script OR in the excel_state() method:
global.excel_state('close') ;
Excel.quit() ;
Sys.OleObject("Excel.Application").quit() ;
Inside the excel_state() method, the first three statements DO execute. Is there anything else I should do? Should I write a loop to wait for it to die? Is there a project setting I have to change?