excel list sheets

Prev Next

Function Names

excel list sheets

Description

This function identifies all sheets (tabs) inside the Microsoft Excel workbook (Open Office format) and returns them in a set containing strings. This information may be necessary in order to load the right table in the Excel file afterwards.

Attention: Encrypted, binary and proprietary legacy file types (e.g. .xlsb, .xls) cannot be processed.

Call as: function

Restrictions

Indirect parameter passing is disabled

Parameter count

1

Parameters

No.TypeDescription
1
input
string name of Excel file name

It must be an Excel file in Open Office format, e.g. with file type .xlsx, .xlsm, .xlst.

Attention: Binary (.xlsb), encrypted and legacy files (.xls) are not supported.

Return value

TypeDescription
set Sheet names

List of all sheet names from left to right as seen in the bottom tabs on Excel

Examples

               sheets[] = excel list sheets( "Examples\Football Membership List.xlsx" );
               echo("The sheets are: ", sheets[] );    

Output

The sheets are: {'Tabelle1'}
Try it yourself: Open LIB_Function_excel_list_sheets.b4p in B4P_Examples.zip. Decompress before use.

See also

table load excel file