The code below will help you to implement an VB.NET app to remove rows from existing spreadsheet. ByteScout Spreadsheet SDK: 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 remove rows from existing spreadsheet in VB.NET.
This rich sample source code in VB.NET for ByteScout Spreadsheet SDK includes the number of functions and options you should do calling the API to remove rows from existing spreadsheet. Follow the instructions from the scratch to work and copy the VB.NET code. Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
Trial version of ByteScout Spreadsheet SDK can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
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) ' Remove row worksheet.Rows.Delete(5, 5) ' 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