How to read an Excel file using VB.Net
The following program illustrates how to open an existing Excel spreadsheet in VB.Net using .NET Framework COM interop capability. Also this program explains how to Find the last used row in Excel and how to find Named Ranges in Excel
Excel Data Reader using Excel Interop
The following VB.Net source code using Microsoft Excel 12.0 Object Library for reading an Excel file. In the previous section we saw how to import Microsoft Excel 12.0 Object Library in the VB.Net project .
Reading Cells in Excel Using VB.NET
If you want to select a specific cell in Excel sheet, you can code like this.
Using EXCEL Named Ranges in VB.NET
If you want to select multiple cell value from Excel sheet, you can code like this.
How to get the range of occupied cells in excel sheet
For reading all used rows of an Excel file in VB.Net, we have to know how many cells used in the Excel file. In order to find the used range we use "UsedRange" property of xlWorkSheet . A used range includes any cell that has ever been used. It will return the last cell of used area.
When you execute this source code the program read all content from Excel file.
- How to create an Excel file in VB.NET
- How to open or read an existing Excel file in VB.NET
- Add new worksheet in Excel file - VB.Net
- Delete worksheet from an excel file - VB.Net
- How to Format Excel Page in VB.NET
- How to insert a Picture in Excel through programing on VB.NET
- How to insert a background Picture in Excel through VB.NET
- How to create a Chart in Excel in VB.NET
- How to export a Chart in Excel as Picture file from VB.NET
- How to Excel Chart in VB.NET Picture Box
- How to Excel DataBar in VB.NET
- How to Excel Data Validation Input Message
- Read and Import Excel File into DataSet or DataTable in vb.net
- How to insert cell data in an Excel file using OLEDB
- How to update cell data in an Excel file using OLEDB
- How to export from database to excel
- How to export from DataGridView to excel