Apply an AutoFormat to an Excel Spreadsheet
发布时间:2016-12-30 来源:查字典编辑
摘要:ScriptCode复制代码代码如下:ConstxpRangeAutoFormatList2=11SetobjExcel=CreateObj...
ScriptCode
复制代码 代码如下:
ConstxpRangeAutoFormatList2=11
SetobjExcel=CreateObject("Excel.Application")
objExcel.Visible=True
SetobjWorkbook=objExcel.Workbooks.Add()
SetobjWorksheet=objWorkbook.Worksheets(1)
k=1
Fori=1to10
Forj=1to10
objWorksheet.Cells(i,j)=k
k=k+1
Next
Next
SetobjRange=objWorksheet.UsedRange
objRange.AutoFormat(xpRangeAutoFormatList2)