The code displayed below will guide you to install an VB.NET app to merge two documents with spreadsheet sdk. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK) and you can use it to merge two documents with spreadsheet sdk with VB.NET.
Want to quickly learn? This fast application programming interfaces of ByteScout Barcode Suite for VB.NET plus the guidelines and the code below will help you quickly learn how to merge two documents with spreadsheet sdk. Just copy and paste the code into your VB.NET application’s code and follow the instructions. If you want to use these VB.NET sample examples in one or many applications then they can be used easily.
Trial version of ByteScout Barcode Suite is available for free. Source code samples are included to help you with your VB.NET app.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Bytescout.Spreadsheet
Imports System.Diagnostics
Imports System.IO
Module Module1
Sub Main()
' Open existing Spreadsheets
Dim document1 As New Spreadsheet()
document1.LoadFromFile("workbook1.xls")
Dim document2 As New Spreadsheet()
document2.LoadFromFile("workbook2.xls")
' Create output document
Dim document3 As New Spreadsheet()
' Add new worksheet
document3.Workbook.Worksheets.Add()
' Target row
Dim targetRow As Integer = 0
For i As Integer = 0 To 9
' Copy cells from first document
For j As Integer = 0 To 11
document3.Worksheet(0).Cell(targetRow, j).Value = document1.Worksheet(0).Cell(i, j).Value
Next
targetRow += 1
Next
For i As Integer = 0 To 9
' Copy cells from second document
For j As Integer = 0 To 11
document3.Worksheet(0).Cell(targetRow, j).Value = document2.Worksheet(0).Cell(i, j).Value
Next
targetRow += 1
Next
' remove output file if already exists
If File.Exists("Output.xls") Then
File.Delete("Output.xls")
End If
' Save document
document3.SaveAs("Output.xls")
' Close Spreadsheet
document3.Close()
' open in default spreadsheets viewer/editor
Process.Start("Output.xls")
End Sub
End Module
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: