Free Trial
Web API version
Licensing
Request A Quote
HAVE QUESTIONS OR NEED HELP? SUBMIT THE SUPPORT REQUEST FORM or write email to SUPPORT@BYTESCOUT.COM
Add Rows Into Existing Spreadsheet | VB.NET
Module1.vb:
VB
Imports Bytescout.Spreadsheet Imports System.IO Imports System.Diagnostics 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 row worksheet.Rows.Insert(6, 1) ' Set values worksheet.Rows(6)(0).Value = "New Name" worksheet.Rows(6)(1).Value = "New Full Name" ' 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