
1个回答
展开全部
一个按钮,五个文本框(文本框用复制方式)
dim
xlsapp
as
excel.application
dim
xlsbook
as
excel.workbook
dim
xlssheet
as
excel.worksheet
set
xlsapp
=
new
excel.application
set
xlsbook
=
xlsapp.workbooks.add
set
xlssheet
=
xlsbook.worksheets(1)
xlssheet.application.columns("a:l").numberformatlocal
=
"@"
'文本格式为通用
xlssheet.cells.horizontalalignment
=
xlcenter
'文本居中
xlssheet.columns("a:l").columnwidth
=
5
'调整列宽(从a列到l列
dim
i
as
integer
for
i
=
0
to
4
xlssheet.cells(
2,
i+
1)
=
text1(i).text
next
i
xlsapp.visible
=
true
set
xlsapp
=
nothing
自己可以研究一下上面的代码(其中文本框用复制做数组)
dim
xlsapp
as
excel.application
dim
xlsbook
as
excel.workbook
dim
xlssheet
as
excel.worksheet
set
xlsapp
=
new
excel.application
set
xlsbook
=
xlsapp.workbooks.add
set
xlssheet
=
xlsbook.worksheets(1)
xlssheet.application.columns("a:l").numberformatlocal
=
"@"
'文本格式为通用
xlssheet.cells.horizontalalignment
=
xlcenter
'文本居中
xlssheet.columns("a:l").columnwidth
=
5
'调整列宽(从a列到l列
dim
i
as
integer
for
i
=
0
to
4
xlssheet.cells(
2,
i+
1)
=
text1(i).text
next
i
xlsapp.visible
=
true
set
xlsapp
=
nothing
自己可以研究一下上面的代码(其中文本框用复制做数组)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询