这个就需要用到vba来打印了,参考下面的例子
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook
wb = App.WorkBooks.Open("D:\Test.xls")
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
With Ws.PageSetup
.PaperSize = MSExcel.XlPaperSize.xlPaperA4 '纸张大小
.CenterHorizontally = True '页面水平居中
.CenterVertically = True '页面垂直居中
.Zoom = False '以下设置将缩印在一页内
.FitToPagesWide = 1 '按照1页的宽度打印
.FitToPagesTall = 1 '按照1页的高度打印
End With
'App.Visible = True
Ws.PrintOut
wb.save
wb.close
App.Quit
[此贴子已经被作者于2014-4-24 14:16:39编辑过]