CString IllusionExcelFile::GetSheetName(long table_index) { CWorksheet sheet; sheet.AttachDispatch(excel_sheets_.get_Item(COleVariant((long)table_index)), true); CString name = sheet.get_Name(); sheet.ReleaseDispatch(); return name; }
CString Illusion_ExcelFile::sheet_name(long table_index) { CWorksheet sheet; _variant_t v_t_idx((long)table_index); sheet.AttachDispatch(excel_sheets_.get_Item(v_t_idx), true); CString name = sheet.get_Name(); sheet.ReleaseDispatch(); return name; }