在VB中插入Excel工作表的问题我正
定义全局变量:
Dim fRApp As Excel。Application
Dim fRBook As Excel。Workbook
Dim fRSheet As Excel。Worksheet
实际运用:
Set fRApp = CreateObject(\"excel。 application\")
fRApp。Visible = True
Set fRBook = forestApp。Workbooks。Add
Set fRSheet = forestBook。 Sheets(1)
fRSheet。PageSetup。CenterHorizontally = True
fRSh...全部
定义全局变量:
Dim fRApp As Excel。Application
Dim fRBook As Excel。Workbook
Dim fRSheet As Excel。Worksheet
实际运用:
Set fRApp = CreateObject(\"excel。
application\")
fRApp。Visible = True
Set fRBook = forestApp。Workbooks。Add
Set fRSheet = forestBook。
Sheets(1)
fRSheet。PageSetup。CenterHorizontally = True
fRSheet。PageSetup。CenterVertically = True
fRSheet。
PageSetup。PaperSize = xlPaperA4
fRSheet。PageSetup。Orientation = xlLandscape
fRSheet。Range(\"A1:A1\")。
Font。Name = \"宋体\"
fRSheet。Range(\"A1:A1\")。Merge
fRSheet。Range(\"A1:A1\")。HorizontalAlignment = xlCenter
fRSheet。
Range(\"A1:A1\")。VerticalAlignment = xlCenter
fRSheet。Range(\"A1:A1\")。Value = 12
如果要显示一个表格就得用到循环了
。收起