欢迎来到福编程网,本站提供各种互联网专业知识!

Apply an AutoFormat to an Excel Spreadsheet

发布时间:2007-06-12 作者: 来源:转载
ScriptCode复制代码代码如下:ConstxpRangeAutoFormatList2=11SetobjExcel=CreateObject("Excel.Application")objExcel.Visible=TrueSetobjWorkbook=objExcel.Workbooks.Add()SetobjWorksheet=objWorkbook.Worksheets(1)k=1Fori=1to10Forj=1to10objWorksheet
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)

相关推荐