GetExcelSheetList |
Top Previous Next |
×V4.1Ø
Syntax: GetExcelSheetList <List Name> <ExcelFileLocationAndName> Where: <List Name> is the user defined name that is assigned to the list. <ExcelFileLocationAndName> is a literal string or a variable that contains a literal string.
Description: This command is used to retrieve a collection of worksheet names from an Excel spreadsheet and store them in a list in EMUE. If the list already exists and has content, then the contents of the source list are appended onto the destination list. If the destination list, does not exist, EMUE will create it using the NoVerifyCount parameter. See CreateList.
This command is useful for determining which worksheet to read from with the GetExcelData command.
Sample: The following example reads a spreadsheet, stores the worksheet names in a list, then looks for the worksheet that is named for last month. GetExcelSheetList Months &FullInputFileName 'Calculate last month DateAdd LastMonth &today 'Format the date to match the format in the spreadsheet DateFormat LastMonth LastMonth "MMMM" :ReadWorksheetNames If EndOfList Months Goto MissingWorksheet GetListMember Months CurrentWorksheet If CurrentWorksheet eq LastMonth Goto ReadSpreadsheet Goto ReadWorksheetNames
See Also:
|