Hello Labwindows Community,
I wanted to understand the project, "Excelreportdemo" in CVI2012\samples\activex\excel\excelreportdemo.prj. Something that I couldn't understand is when I run the GUI, it always appears to open up to Sheet 4. I used the following set of functions on another program as well and saw that it would open to Sheet 4 as well.
static CAObjHandle applicationHandle = 0;
static CAObjHandle worksheetHandle = 0;
static CAObjHandle workbookHandle = 0;
error = ExcelRpt_ApplicationNew(1, &applicationHandle);
if (error<0)
{
MessagePopup (APP_AUTOMATION_ERR, LAUNCHERR);
goto Error;
}
ExcelRpt_WorkbookNew(applicationHandle, &workbookHandle);
ExcelRpt_WorksheetNew(workbookHandle, -1, &worksheetHandle);
Yet, I still see that it opens to Sheet 4. My questions are:
1.) Does anyone else see this behavior?
2.) What do you suspect the cause is and how can we create an Excel file that only writes to one sheet?
Please let me know if there is any question I can answer.
Cheers,
Vincent