| MATLAB Function Reference | ![]() |
typ = xlsfinfo(filename)
[typ, desc] = xlsfinfo(filename)
[typ, desc, fmt] = xlsfinfo(filename)
xlsfinfo filename
typ = xlsfinfo(filename) returns the string 'Microsoft Excel Spreadsheet' if the file specified by filename is an XLS file that can be read by the MATLAB® xlsread function. Otherwise, typ is the empty string, (''). The filename input is a string enclosed in single quotes.
[typ, desc] = xlsfinfo(filename) returns in desc a cell array of strings containing the names of each spreadsheet in the file. If a spreadsheet is unreadable, the cell in desc that represents that spreadsheet contains an error message.
[typ, desc, fmt] = xlsfinfo(filename) returns in the fmt output a string containing the actual format of the file as obtained from the Microsoft® Excel® COM server. On UNIX® systems, or on Windows® when the COM server is not available, fmt is returned as an empty string, ('').
Note In the case where an Excel COM server cannot be started, functionality is limited in that some Excel files might not be readable. |
xlsfinfo filename is the command format for xlsfinfo. It returns only the first output, typ, assigning it to the MATLAB default variable ans.
Get information about an .xls file:
[typ, desc, fmt] = xlsfinfo('myaccount.xls')
typ =
Microsoft Excel Spreadsheet
desc =
'Sheet1' 'Income' 'Expenses'
fmt =
xlWorkbookNormalExport the .xls file to comma-separated value (CSV) format. Use xlsfinfo to see the format of the exported file:
[typ, desc, fmt] = xlsfinfo('myaccount.csv');
fmt
fmt =
xlCSVExport the .xls file to HTML format. xlsfinfo returns the following format string:
[typ, desc, fmt] = xlsfinfo('myaccount.html');
fmt
fmt =
xlHtmlExport the .xls file to XML format. xlsfinfo returns the following format string:
[typ, desc, fmt] = xlsfinfo('myaccount.xml');
fmt
fmt =
xlXMLSpreadsheet![]() | xlim, ylim, zlim | xlsread | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |