This is probably a very stupid question, but how do I acquire the handle of the desired worksheet? In my application, I use;
// Get Active Workbook Sheets
Excel_GetProperty (ExcelAppHandle, NULL, Excel_AppSheets,CAVT_OBJHANDLE, &ExcelSheetsHandle);
but this will only return the sheet which is active at the moment. (i.e. the sheet that was active by default when opening my resultsfile)
This means that if I would save the workbook with the wrong sheet selected, the resultprinting would take place on the wrong sheet. (I want to have one sheet where all source data from my application goes, then have other sheets for graphical result)
For example, how do I select a sheet called "Source"?
I've tried to use;
Excel_WorksheetSelect (CAObjHandle
objectHandle,
ERRORINFO *errorInfo, VARIANT replace);
..but I don't understand the use of VARIANT replace.
Any tips or documentation are welcome!