VB.NET - Excel files importing tutorial - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

VB.NET – Excel files importing tutorial

VB.NET Excel files importing tutorial shows how to read from Excel files (XLS, XLSX) with Visual Basic .NET using Spreadsheet SDK. Use the source code sample below to import data from Excel files.

VB.NET

 ' Create new Spreadsheet SDK object in VB
       Dim document As New Spreadsheet()
       document.LoadFromFile("MyExcelFile.xls") ' you may open xlsx Excel files too

       ' Get the worksheet named "Sheet1" from excel file
       Dim worksheet As Worksheet = document.Workbook.Worksheets.ByName("Sheet1")

       ' Now we can read cells from this worksheet. We will read A1 cell value 
       Console.WriteLine("Cell A1 value: {0}", worksheet.Cell("A1").Value)
       ...
       ....
       document.Dispose()
       document = nothing

Tutorials:

prev
next