好像不能打印,你可以引用excel对象,再用循环把记录写到excel中去:
dim myapp as excel.application
dim mybook as excel.workbook
dim mysheet as excel.worksheet
dim strdestination as stringon error goto errhandle
strdestination£½app.path & "123.xls"set myapp=createobject("excel.application")
myapp.visible=false
set mybook=myapp.workbooks.open(strdestination)
set mysheet=mybook.worksheets(1)
mysheet.cells.clearwith mysheet
for i=0 to msh.rows-1
for j=0 to msh.cols-1
.cell(i+1,j+1)=msh.textmatrix(i,j)
next
next
end with
mybook.close true
myapp.quit
dim myapp as excel.application
dim mybook as excel.workbook
dim mysheet as excel.worksheet
dim strdestination as stringon error goto errhandle
strdestination£½app.path & "123.xls"set myapp=createobject("excel.application")
myapp.visible=false
set mybook=myapp.workbooks.open(strdestination)
set mysheet=mybook.worksheets(1)
mysheet.cells.clearwith mysheet
for i=0 to msh.rows-1
for j=0 to msh.cols-1
.cell(i+1,j+1)=msh.textmatrix(i,j)
next
next
end with
mybook.close true
myapp.quit
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货