Test if file is an Excel workbook file and get info
[status,sheets,wbformat]=xlinfo(file_path)
a character string giving the path of the file to be checked
A boolean with %t value if file is a valid Excel file or %f if not.
a vector of strings containing the sheets names.
a character string giving the format of the Excel file, 'xlOpenXMLWorkbook' for
EXCEL2007 files or 'xlWorkbookNormal' for EXCEL97 files.
filename = fullfile(SCI,'modules/spreadsheet/demos/xls/t1.xls'); [status,sheets,wbformat] = xlinfo(filename) filename = fullpath(atomsGetLoadedPath("xlreadwrite")+'/demos/xlsx/Testbig.xlsx'); [status,sheets,wbformat] = xlinfo(filename) | ![]() | ![]() |
This function is based on POI library (http://poi.apache.org/).