2012年6月28日 星期四
Print an Excel file in VB 方法
1) Add a reference to Excel Object Library in .NET
2) Include (with Imports statments)
Imports Excel = Microsoft.Office.Interop.Excel 'Reference: Excel Object
Library" 3) Add (with Class member variable statements)
Friend WithEvents exWB As Excel.Workbook
Friend WithEvents exAPP As Excel.Application
Friend WithEvents exWS As Excel.Worksheet
4) Open the excel file (using OpenFileDialog)
exAPP.Workbooks.Open(ofd.FileName)
5) Use the PrintOut method for object you want to print.
exApp.ActiveSheet.PrintOut
2012年6月25日 星期一
2012年6月24日 星期日
2012年6月22日 星期五
2012年6月21日 星期四
訂閱:
文章 (Atom)





