|
|
| File Information |
| Description |
XLS2VAR Load Excel file as variables named in the header line
XLS2VAR(file) loads the Excel file 'file'. This file should have the variable name as a string in the first row.
GENVARNAME is used to generate a valid MATLAB variable name from this value.
Blanks in numeric data are returned as 'NaN'.
Returns xlsvars which is a structure, each header (first row strings) of the Excel file is a field.
Platform support is dependent on XLSREAD.
example:
Given this Excel file content (9 columns, 5 rows):
one two three four ' ' six se ven
1 2 3 6 7
11 22 three
seven
222 33
xlsStruct=xls2vars('example.xls')
Where:
xlsStruct.one' = 1 11 NaN NaN
xlsStruct.two' = 2 22 NaN 222
xlsStruct.three' = [3] 'three' [NaN] [33]
xlsStruct.four' = NaN NaN NaN NaN
xlsStruct.x' = NaN NaN NaN NaN
xlsStruct.six' = 6 NaN NaN NaN
xlsStruct.seVen' = [7] [NaN] 'seven' [NaN]
See also: xlsread genvarname
|
| MATLAB release |
MATLAB 7.6 (R2008a)
|
| Other requirements |
Not tested on non-windows platform. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 29 Dec 2008 |
*Use dynamic structure field names instead of eval
*More flexibility for input data format in excel sheet |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com