Read Excel sheet into a structure array

Version 1.0 (7,59 KB) von Wei-Rong Chen
Read Excel sheet into a structure array
816 Downloads
Aktualisiert 11. Apr 2015

Lizenz anzeigen

% 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'

Zitieren als

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. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2008a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Tags Tags hinzufügen

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0