Returns a list of all the sheets in a workbook
static int WorkbookGetWorksheetNames( std::vector<CString>& vecSheetNames, LPCTSTR name_text = 0, bool complete_names = false ); static int WorkbookGetWorksheetNames( std::vector<CStringA>& vecSheetNamesA, LPCSTR name_text_a = 0, bool complete_names = false ); static int WorkbookGetWorksheetNames( std::vector<CStringW>& vecSheetNamesW, LPCWSTR name_text_w = 0, bool complete_names = false ); |
A reference to a collection of strings that will be cleared and populated with sheet names if the function succeeds.
Name_text is the name of an open workbook. If omitted, the active workbook is used.
Complete_names is a boolean value that controls whether the returned names will be in complete form (i.e. book[sheet]), or in short form (sheet). If omitted, the short form will be used.
A reference to a collection of ANSI strings that will be cleared and populated with sheet names if the function succeeds.
Name_text_a is the name of an open workbook. If omitted, the active workbook is used.
A reference to a collection of ANSI strings that will be cleared and populated with sheet names if the function succeeds.
Name_text_w is the name of an open workbook. If omitted, the active workbook is used.
Zero if the function has been called successfully; non-zero if the function could not be called. See Error codes for a list of return values.
This a helper function that calls GET.WORKBOOK(2) and extracts the resulting array into a vector of strings. around See the Microsoft Excel on-line Help for full details about this function.
Header: xlfuncs.h