이 제출물을 팔로우합니다
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다
Usage: writeexcel(file, varlist)
Writes data to an Excel xml file on any system (NO Excel or ActiveX required!).
Scalars will end up on a sheet called "Scalars" as name (in the first column) and value (in the second column) pairs. Arrays and cell arrays are saved on individual sheets, named by the variable name.
If you find any errors, please let me know at peder at axensten dot se. This is still pretty much work in progress, see 'to do', below.
ARGUMENTS:
file File name path. If prefixed with a '>' (see example, below), the data will be added to an existing file (that was generated by this macro!).
varlist List of variables, expressions, and/or strings. Variables and expressions will be written to the file, expressions must be preceded by a '\name', below. A special case is if a variable of type structure is called DocumentProperties, its field names and values will set the document properties (see the example). Strings can be of the following: - '\name' sets the name of the next variable or expression, names must be unique.
EXAMPLE:
DocumentProperties= struct('Title','My Title','Author','Me','Subject','very interesting');
astring= 'Hi ya!';
ascalar= pi;
anarray= [1 2 3; 4 5 6];
acellarr= {'abc', 'def'; pi, NaN; -Inf Inf};
writeexcel('Workbook.xml', anarray, ascalar, astring, acellarr, DocumentProperties);
writeexcel('>Workbook.xml', '\another scalar', 2*pi/5);
HISTORY:
Version 1.0, first working version, 2007-09-04.
Version 1.1, released 2007-09-06:
- Fixed a bug when saving vectors.
- Fixed a bug when adding scalars when there previously were none.
- Now UTF-8 works.
- Added check for possible fopen problems.
- Added better input argument check.
- Can now add document metadata through structure named DocumentProperties.
- Writing structures too, columns named by fieldnames (the struct class).
- Writing symbolic expressions too (the sym class).
Version 1.2, released 2007-09-18:
- Fixed mlint warnings.
- Fixed problem with certain characters in meta data.
- Removed all regexprep calls for better compatibility.
- Removed automatic .xls suffix.
TO DO:
- '%format' or {'%form1', '%form2', etc.} to control how columns will be shown (numbers will be stored with 'all' decimals, but the column formats will be set)
COPYRIGHT: (c) 2007 Peder Axensten. Use at own risk.
KEYWORDS: save, export, write, Microsoft, Excel, xml
REQS: Does NOT require Excel, Active X, or a Windows system!
REFERENCE: http://msdn2.microsoft.com/en-us/library/aa140066(office.10).aspx
인용 양식
Peder Axensten (2026). writeexcel (https://kr.mathworks.com/matlabcentral/fileexchange/16229-writeexcel), MATLAB Central File Exchange. 검색 날짜: .
| 버전 | 퍼블리시됨 | 릴리스 정보 | Action |
|---|---|---|---|
| 1.0.0.0 | - Fixed mlint warnings.
|
