help xlswrite:
帮助xls写入
[SUCCESS,message ]=xls write (文件,阵列,表,范围) writes ARRAY to the Excel
workbook,FILE,into the area,rangeintheworksheetspecifiedinsheet。
fileandarraymustbespecified.ifeitherfileorarrayisempty,a
erroristhrownandxlswriteterminates.thefirstworksheetofthe
workbookisthedefault.ifsheetdoesnotexist,a new sheet is added at
theendoftheworksheetcollection.ifsheetisanindexlargerthanthe
number of worksheets,newsheetsareappendeduntilthenumberofworksheets
intheworkbookequalssheet.thesizedefinedbytherangeshouldfitthe
sizeofarrayorcontainonlythefirstcell,e.g. 'A2'. If RANGE is larger
than the size of ARRAY,excelwillfilltheremainderoftheregionwith
# n/a.ifrangeissmallerthanthesizeofarray,only the sub-array that
fitsintorangewillbewrittentofile.thesuccessoftheoperationis
returnedinsuccessandanyaccompanyingmessage,in MESSAGE. On error,
消息shall be a struct,containingtheerrormessageandmessageid。
See NOTE 1。
[SUCCESS,message]=xlswrite(file,ARRAY,SHEET ) writes ARRAY to the Excel
workbook,FILE,startingatcella1of sheet.thisformisusedifthe
third argument is not a valid range。
[SUCCESS,message ]=xls write (文件,阵列,范围) writes ARRAY to the Excel
工作簿,文件,usingrangeasaboveinthefirstworksheet。
[SUCCESS,message]=xlswrite(file,ARRAY ) writes ARRAY to the Excel
workbook,FILE,startingatcella1ofthefirstworksheet.the return
values are as for the above example。
INPUT PARAMETERS:
file : stringdefiningtheworkbookfiletowriteto。
默认目录is pwd; 默认扩展' xls '。
阵列: mxnumericarrayorcellarray。
sheet : stringdefiningworksheetname;
双精度,定义工作表索引。
range : stringdefiningdataregioninworksheet,using the Excel
' A1' notation。
返回参数:
success :逻辑标量。
消息: structcontainingmessagefieldandmessage _ idfield。
EXAMPLES:
success=xlswrite(c:(MATLAB ) work ) myworkbook.xls ),a,(A2:C4) ) will write A to
the workbook file,myworkbook.xls,andattempttofittheelementsofainto
the rectangular worksheet region,A2:C4. On success,SUCCESS will contain true,
while on failure,SUCCESS will contain false。
note 1: theabovefunctionalitydependsuponexcelasacomserver.in
absence of Excel,arrayshallbewrittenasatextfileincsvformat.in
this mode,thesheetandrangeargumentsshallbeignored。
See also xlsread,wk1write,csvwrite。
帮助浏览器中的参考页面
doc xls编写器