Link Search Menu Expand Document

SSpread.GetExcelSheetList Method

Explanation Gets the sheet name list from the specified Excel file.
The acquired sheet name can be used to specify the sheet name of the ImportExcelSheet method.
Call format GetExcelSheetList(URL or Reader)
Return value UString array object containing a list of sheet names
Arguments URL or Reader Excel file URL or Reader Object

If specify a URL, the file will be cached on local computer for faster loading from the next time onwards. The latest files from the server can be acquired by specifying an HttpResponse object.
Exception EXT-24 No valid Reader object specified
EXT-28 An error occurred in the GetExcelSheetList method
Example of use
    var session = findHttpSession("http://example.com");
    var res = session.Get("/excelfile.xls");
    var ret = GetExcelSheetList(res);
    
    print("Sheet Count", ret.Length, "\n");
    for (var i = 0; i < ret.Length; i++) {
        print(ret[i], "\n");
    }
    
Related item ExportExcelBook, ExportExcelBookEx, ExportToExcel, ExportToExcelEx, ImportExcelSheet methods
HttpResponse class