Read Excel sheet into a structure array

版本 1.0 (7.6 KB) 作者: Wei-Rong Chen
Read Excel sheet into a structure array
816.0 次下载
更新时间 2015/4/11

查看许可证

% outstruct=xls2struct(xlsFName,sheetnum)
% This function reads the sheet of 'sheetnum' of the input Excel file('xlsFName') and convert it into a
% 1x1 structure array 'outstruct' containing column fields.
% Each field in the output structure containes the data of the
% corresponding column in the input Excel sheet.
% The input Excel sheet MUST content a header row as the first row, which
% will serve as the field name of the output struct.
% 'sheetnum' : the number of the sheet in the input Excel file from which
% the data are read. Default = 1
% Example:
% xls2struct('text.xlsx');
%
% See also 'WriteXlsFromStruct.m'

引用格式

Wei-Rong Chen (2024). Read Excel sheet into a structure array (https://www.mathworks.com/matlabcentral/fileexchange/50464-read-excel-sheet-into-a-structure-array), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2008a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Spreadsheets 的更多信息
标签 添加标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0