|
|
| File Information |
| Description |
[S,E] = XLS2STRUCT(FILE) reads the Excel-file FILE and converts the columns
into separate fields in the structure S. The first line of the file
must contain unique headers for all of the columns, the rest of the file
is data.
Column names can contain spaces, these are converted to underscores in
order to obtain proper variable names.
S is the plane representation of the table. E is a second structure with
an element-wise representation. I.e. notation S.Time(i) versus E(i).Time.
XLS2STRUCT(FILE,SHEET) reads SHEET instead of the default sheet.
Example:
City Time Temp
Dallas 12 98
Tulsa 13 99
Boise 14 97
converts to
S.City = {'Dallas','Tulsa','Boise'}';
S.Time = [12 13 14]';
S.Temp = [98 99 97]';
E(1)
ans =
City: 'Dallas'
Time: 12
Temp: 98 |
| MATLAB release |
MATLAB 7.0.1 (R14SP1)
|
| Other requirements |
The new version requires Matlab 7. However an pre 7 version is included. |
| Zip File Content |
|
| Other Files |
structrows.m, xls2struct.m, xls2structpre7.m
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (6) |
| 21 Nov 2003 |
Sergio Lucero
|
|
|
| 16 Mar 2004 |
Matt Swann
|
|
|
| 06 Aug 2004 |
Thomas Dionysopoulos
|
|
|
| 18 Nov 2004 |
Matthew Hoffman
|
|
|
| 17 Dec 2004 |
Mark Bower
|
|
|
| 17 Aug 2007 |
Dmitry Savransky
|
|
|
| Updates |
| 29 Nov 2004 |
The updated version converts headers like "column A" to "column_A". |
| 24 Jan 2005 |
The function is greatly simplified by using the option in xlsread to read the raw data table. This also fixes some problems with mixed/numeric tables |
| 24 Jan 2005 |
The function is greatly simplified by using the option in xlsread to read the raw data table. This also fixes some problems with mixed/numeric tables |
| 24 Jan 2005 |
The function is greatly simplified by using the option in xlsread to read the raw data table. This also fixes some problems with mixed/numeric tables |
| 28 Jan 2005 |
A major bug in the last update. |
|
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