Assuming the WorksheetPage contains an embedded Excel workbook, it returns the COM object associated with the Excel workbook, which allows direct COM programming of the Excel workbook.
BOOL GetExcelCOMObject( Object & obj )
TRUE if success, otherwise FALSE.
EX1
int WorksheetPage_GetExcelCOMObject_ex1() { WorksheetPage wkbk("Book1"); // assumes that there exists an Excel window with the name "Book1" // inside the project. Object objExcelWkbk; BOOL bSuccess = wkbk.GetExcelCOMObject(objExcelWkbk); if (bSuccess) out_str("Succeeded!"); else out_str("Failed!"); return (int)bSuccess; }
WorksheetPage::ExcelSheet, WorksheetPage::OpenExcel
origin.h