Mouseover text to see original. Click the button below to return to the English verison of the page.
Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.
Translate This Page
MathWorks Machine Translation
The automated translation of this page is provided by a general purpose third party translator tool.
MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.
xlsfinfo
Determine if file contains Microsoft Excel spreadsheet
[status,sheets,xlFormat]
= xlsfinfo(filename) also returns
the format description that Excel® returns for the file. On systems
without Excel for Windows®, xlFormat is
an empty character vector, ''.
If filename is a file that xlsread can
read, then status is descriptive text, such as 'Microsoft
Excel Spreadsheet'.
If filename is not a file that xlsread can
read, then status is empty, ''.
If MATLAB® cannot find the file, then xlsfinfo returns
an error.
sheets — Worksheet names 1-by-n cell array of character vectors
Worksheet names, returned as a 1-by-n cell
array of character vectors, where n is the number
of worksheets in the file. Each cell contains the name of a worksheet.
If xlsread cannot read a particular worksheet,
the corresponding cell contains an error message.
If xlsfinfo cannot read the file, then sheets contains
an error message.
xlFormat — File format description returned by Excel character vector
File format description returned by Excel, returned as
a character vector.
On Windows systems with Excel software, xlFormat is
one of the following.
'xlOpenXMLWorkbook'
Spreadsheet in XLSX format (Excel 2007 or later)
'xlWorkbookNormal' or 'xlExcel8'
Spreadsheet in XLS format (compatible with Excel 97-2003)
'xlCSV'
File in comma-separated value (CSV) format
'xlHtml' or 'xlWebArchive'
Spreadsheet exported to HTML format
On all other systems, xlFormat is an empty
character vector, ''.
If xlsfinfo warns that it cannot
start an ActiveX® server, then the COM server, which is part of
the typical Excel installation, is unavailable. In this case,
consider reinstalling your Excel software. On systems with Excel for Windows, xlsfinfo uses
the COM server to obtain information.