复制代码 代码如下:
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)