ByteScout tutorials are designed to explain the code for both VB.NET beginners and advanced programmers. ByteScout Spreadsheet SDK is the library (SDK) that is capable of writing, reading, modifying and calculating Excel and CSV spreadsheets. Most popular formulas can be calculated and reculculated with Excel installed. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays. It can add columns into existing spreadsheet in VB.NET.
VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout Spreadsheet SDK. Follow the instructions from the scratch to work and copy the VB.NET code. Code testing will allow the function to be tested and work properly with your data.
ByteScout free trial version is available for download from our website. It includes all these programming tutorials along with source code samples.
Imports Bytescout.Spreadsheet Imports System.IO Module Module1 Sub Main() ' Open Spreadsheet Dim document As New Spreadsheet() document.LoadFromFile("AdvancedReport.xls") ' Get Worksheet Dim worksheet As Worksheet = document.Workbook.Worksheets(0) ' Add new Column worksheet.Columns.Insert(3, 1) ' Set values worksheet.Rows(0)(2).Value = "Age" ' remove output file if already exists If File.Exists("Output.xls") Then File.Delete("Output.xls") End If ' Save document document.SaveAs("Output.xls") ' Close Spreadsheet document.Close() ' open in default spreadsheets viewer/editor Process.Start("Output.xls") End Sub End Module