Hi
Im using CVI 2009 and trying to open a workbook using the Excel 11.0 object library.
This is what i got so far:
Excel_NewApp (NULL, 1, LOCALE_NEUTRAL, 0,&ExcelStruct.AppHandle);
Excel_WorkbooksOpen (ExcelStruct.AppHandle, NULL, Mapping.ExcelFilePath, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, CA_DEFAULT_VAL,
CA_DEFAULT_VAL, &ExcelStruct.WorkBookHandle);
// Get First Sheet
Excel_WorkbookGetWorksheets (ExcelStruct.WorkBookHandle, NULL,&ExcelSheetsHandle);
Excel_SheetsGetItem (ExcelStruct.AppHandle, NULL, CA_VariantInt(1),&ExcelStruct.WorkSheetHandle);
I keep on getting an Unknown error when trying to open a workbook.
Im i doing this correct?
Help share your knowlegde