I am interfacing my program to excel. I am opening a new worksheet and write in a particular sheet. When I quit the program excel closes however, excel is still visible in the Task Bar (pressing CTRL-ALT-DEL).
I have based my progam on exceldemo2000.
Please find attaced a sample code which is giving me trouble.
I have noted that the following code found in the funcion Excel_WriteString found in my file attatched would leave excel resident in memory. When I remarked this part of the code excel closed gracefully.
// Get Active Workbook Sheets
if (Error >= 0)
{
Error = Excel_GetProperty (ExcelAppHandle, NULL, Excel_AppSheets, CAVT_OBJHANDLE, &ExcelSheetsHandle);
}
// Get Sheet
if (Error >= 0)
{
Error = Excel_SheetsItem (ExcelSheetsHandle, NULL, CA_VariantInt(sheet), &ExcelWorksheetHandle);
}
What's wrong with this code then?!
Thanks