The sample shows instructions and algorithm of how to export to dataset with spreadsheet sdk and how to make it run in your VB.NET application. ByteScout Barcode Suite can export to dataset with spreadsheet sdk. It can be applied from VB.NET. ByteScout Barcode Suite is the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK.
Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout Barcode Suite for export to dataset with spreadsheet sdk below and use it in your application. Follow the instructions from scratch to work and copy the VB.NET code. Further improvement of the code will make it more robust.
Our website gives trial version of ByteScout Barcode Suite for free. It also includes documentation and source code samples.
Module Module1 Sub Main() Dim inputFile As String = "PeriodicTableOfElementsSpreadsheet.xls" 'Open and load spreadsheet Dim spreadsheet = New Spreadsheet() spreadsheet.LoadFromFile(inputFile) 'Get the data from the spreadsheet Dim ds As DataSet = spreadsheet.ExportToDataSet() 'Close spreadsheet spreadsheet.Close() 'Display data in first datatable of dataset Dim dt As DataTable = ds.Tables(0) Console.WriteLine("Displaying contents of first datatable") For i As Integer = 0 To dt.Rows.Count - 1 For j As Integer = 0 To dt.Columns.Count - 1 Console.Write(dt.Rows(i)(j) + " ") Next Console.WriteLine() Next 'Pause Console.ReadLine() End Sub End Module