Modified from Francisco de Castro's code, struc2xls lets you save data structures containing a mix of numeric and non-numeric data to an Excel file. This version runs faster than the original and has several extra output options.
STRUC2XLS (FILE,S) writes the data structure S to an Excel workbook named FILE in the current directory. Data fields can be numeric, non-numeric, or mixed. Output can be oriented vertically (field names in first column, data in rows) or horizontally (field names in first row, data in columns). I'm sure there's room for improvement here. Let me know...
EXAMPLES:
Create a sample structure 's' with two fields:
s=struct('Name',{'Jon','Jonathan','Johnny'},'Score',[85,100,75]);
Basic output to file 'demo.xls' in current directory:
struc2xls('demo',s)
Output beginning in cell D4 of Excel file:
struc2xls('demo',s,'Col','D','Row',4)
Output to specified worksheet 'Students':
struc2xls('demo',s,'Sheet','Students')
Output horizontal data (header row, data in columns):
struc2xls('demo',s,'Orientation','H')
Output to alternate directory
struc2xls('C:\Users\Johnny\Desktop\demo',s)
인용 양식
Jeff Evans (2026). struc2xls (https://kr.mathworks.com/matlabcentral/fileexchange/22510-struc2xls), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux카테고리
태그
도움
도움 받은 파일: struc2xls
| 버전 | 게시됨 | 릴리스 정보 | |
|---|---|---|---|
| 1.0.0.0 |
