Xlsreadr
Purpose
Reads .XLS files from MS Excel and other spreadsheets.
Synopsis
- out = xlsreadr(file,sheets,options)
Description
This function reads Microsoft XLS files, parses the contents into a DataSet object. If called with no input a dialog box allows the user to select a file to read from the hard disk. Optional input (file) is a text string with the file name. Optional input (sheets) is a cell array containing the names of one or more sheets in XLS file to read. Or it can be a string specifying a single sheet to read, or it can be an integer vector specifying which sheets to read. If sheets contains any invalid names or index values then those invalid names or indices are removed from the requested sheets. Note that the primary difference between this function and the Mathworks function xlsread is the parsing of labels and output of a dataset object.
Optional input (options) specifies the parsing options. For details on these options, see parsemixed.
Note that the primary difference between this function and the Mathworks function xlsread is the parsing of labels and output of a dataset object.
Optional Inputs
- file = Text string with name of excel file to read.
- sheets = Integer or integer vector specifying which sheets to read text string specifying which sheet to read cell array of text strings specifying which sheets to read.
- options = Structure array with the following fields, see PARSEMIXED.
Outputs
- out = Output dataset object containing contents of file.
- usedoptions = options structure actually used when parsing (includes any options modified by the user in the graphical selection interface). Can be used to repeat an import with the same user-selected file parsing.