This section is specifically dedicated to VB.Net and Excel.
- VB.Net Version: 2010 Ultimate
- Excel Version: Excel Professional Plus 2010
We will be covering the following. In case you feel that I should be covering something besides the below then do drop me a line and I will include that.
Note: The below section takes you step by step and then in point 24 shows how to close and clean up. Before you start using the Samples from below, I would recommend you to read this point 2 (below) first.
- Setting up VB.Net to Work with Excel
- Vb.Net Two Dot Rule when working with Office Applications (Imp: Read Me First)
- Creating a New Excel File
- Opening an Excel File
- Writing some text to Excel File
- Inserting Formulas
- Formatting Text
- Creating/Formatting a Table
- Creating/Formatting a Chart
- Creating/Formatting a Pivot Table
- Sorting Data
- Grouping/UnGrouping Data
- Subtotals
- Filtering a Range – Adding AutoFilter
- Checking if a Sheet Exists
- Adding/Deleting Sheets to the Excel File
- Copying and Pasting Range
- Merging/Unmerging Cells
- Adding/Deleting Shapes in a worksheet
- Page Setup in Excel
- Printing Excel Sheet/Workbook
- Protecting/Unprotecting a Worksheet/Workbook
- Saving the Excel File (Save / Save As Method)
- Mailing the Excel file using Outlook
- Close Excel and Clean Up (Also see this)
- Find and Replace in Excel using VB.Net (Added on 16th Oct 2011)
- VB.Net to Read and Set Excel’s Inbuilt Document Properties (Added on 19th Jan 2012)
- Fill/Retrieve data from PDF Form Fields using VB.Net From an Excel File (Added on 28th Jan 2012)
- Calling Excel Macros programmatically in VB.Net (Added on 20th Mar 2012)
- VB.Net – Interacting with Comments in Excel Cells (Added on 28th Apr 2012)
- VB.Net/VBA Copy Rows From Multiple Tabs Into One Sheet in Excel (Added on 5th Jun 2012)
- Excel Text To Columns From VB.net (Added on 29th Jun 2012)
- Find Last Row in an Excel Sheet–VBA/VB.Net (Added on 03rd Oct 2012)
- Find Last Column in an Excel Sheet–VBA/VB.Net (Added on 09th Nov 2012)
- Calling Excel Worksheet Formulas from VB.Net (Added on 02nd Dec 2012)
- Excel Inputbox Automation from VB.NET (Added on 20th Apr 2013)
- Unprotecting VBA Project Password (Added on 24th Apr 2013)
- Find Excel’s VBE Command Bar names and built-in controls IDs. – VBA and VB.Net (Added on 02nd May 2013)



