Quickly learn how to export to 2d array with spreadsheet sdk in VB.NET with this sample source code. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can be applied to export to 2d array with spreadsheet sdk using VB.NET.
The following code snippet for ByteScout Data Extraction Suite works best when you need to quickly export to 2d array with spreadsheet sdk in your VB.NET application. Just copy and paste the code into your VB.NET application’s code and follow the instructions. Want to see how it works with your data then code testing will allow the function to be tested and work properly.
You can download free trial version of ByteScout Data Extraction Suite from our website to see and try many others source code samples for VB.NET.
Module Module1 Sub Main() Dim inputFile As String = "StockPricesSpreadsheet.xls" 'Open and load spreadsheet Dim spreadsheet As Spreadsheet = New Spreadsheet spreadsheet.LoadFromFile(inputFile) 'Get the data from the spreadsheet Dim stockPrices(,) As String = spreadsheet.ExportTo2DArray() 'Close spreadsheet spreadsheet.Close() 'Display contents of the array For i As Integer = 0 To stockPrices.GetLength(0) - 1 Step 1 For j As Integer = 0 To stockPrices.GetLength(1) - 1 Step 1 Console.Write(stockPrices(i, j) + " ") Next Console.WriteLine() Next 'Pause Console.ReadLine() End Sub End Module