如果你想用VB创建execl,以下供参考
Dim NewXls As Excel.Application
Dim NewBook As Excel.Workbook
Dim NewSheet As Excel.Worksheet
Set NewXls = CreateObject("Excel.Application") '创建excel应用程序
NewXls.SheetsInNewWorkbook = 4 '建立4个sheet,可以修改
Set NewBook = NewXls.Workbooks.Add '创建工作簿
Set NewSheet = NewBook.Worksheets(2) '选择sheet2
'自己编写sheet2的单元格的赋值或者属性操作
Set NewSheet = NewBook.Worksheets(1) '选择sheet1
NewXls.Workbooks(1).Worksheets(1).Range("a1:g11").Borders.Weight = xlThin '设置边框
NewXls.Workbooks(1).Worksheets(1).Range("a1:g11").HorizontalAlignment = 3 '设置居中
NewXls.Workbooks(1).Worksheets(1).Range("a1:g11").ColumnWidth = 10 '设置列宽
'其他的自己编写sheet1的单元格的赋值或者属性操作