Printing Excel Sheet/Workbook

In continuation from here… To print an Excel Sheet use this code. Imports Excel = Microsoft.Office.Interop.Excel Public Class Form1 '~~> Define your Excel Objects Dim xlApp As New Excel.Application Dim xlWorkBook As Excel.Workbook Dim xlWorkSheet As...

Page Setup

In continuation from here… Once you have the data all set in your worksheet, you might want to tweak a few settings in the page setup before the document can be printed. Here is the code: Imports Excel = Microsoft.Office.Interop.Excel Public Class Form1 '~~>...

Call Excel Macros

Let’s say we have the following Macros in Excel Sub RunMe() MsgBox "Called from VB.net Client", vbInformation, "Demo to run Excel macros from VB.net" End Sub Sub ShowMsg(msg As String, title As String) MsgBox msg, vbInformation, title End Sub Let’s save the Excel File...