PLS_Toolbox Documentation: xclreadr< xclputdata xlsreadr >

xclreadr

Purpose

Reads ASCII flat files from MS Excel and other spreadsheets as a DataSet Object.

Synopsis

 

out = xclreadr(file,delim,options)

Description

XCLREADR reads tab, space, comma, semicolon or bar delimited files with names on the columns (variables) and rows (samples).

If XCLREADR is called with no input, or an empty matrix for file name file, 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 to read.

Optional input delim can be used to specify delimiter character. Supported delimiters include:

                'tab' or   '\t' or sprintf('\t')

            'space' or   ' '

            'comma' or   ','

              'semi' or   ';'

                'bar' or   '|'

The output out is a dataset object with date, time, info (data from cell (1,1)) the variable names (vars), sample names (samps), and data matrix (data).

Note that the primary difference between this function and the Mathworks function xlsread is the parsing of labels and output of a dataset object.

Options

             options =   a structure array with the following fields:

               parsing:   [ 'manual' | {'automatic'} ] determines the type of parsing to perform. When set to 'automatic', the file is automatically parsed for labels and header information. When set to 'manual' the below options are used to determine the number of labels and header information. Note that when the file type is XLS, automatic parsing is always performed.

(the following options are only used when options.parsing='manual')

         headerrows:   [{0}] number of header rows to expect in the file.

           rowlabels:   [{1}] number of row labels to expect in the file.

           collabels:   [{1}] number of column labels to expect in the file.

 

The default options can be retreived using: options = xclreadr('options');.

See Also

areadr, dataset, spcreadr, xclgetdata, xclputdata, xlsreadr


< xclputdata xlsreadr >