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...

.Find and .FindNext

The most under utilized feature of Excel when it comes to finding data is .Find and .FindNext. Most of us use loops in case we want to find something in Excel. For Example, Let’s say Our data is in sheet1 from Cell A1 to A65000 and the data is like this A1 → 1 A2 → 2...

Text To Columns

There are many occasions where we need to open a text file in Excel and then arrange them in separate columns. If we directly open the file in Excel then we notice that everything is filled in Col A. In such a scenario what  can we do? Excel has an inbuilt feature...