Source code documentation samples give simple and easy method to install a needed feature into your application. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK and you can use it to merge two documents with spreadsheet sdk with C#.
These C# code samples for C# guide developers to speed up coding of the application when using ByteScout Data Extraction Suite. Simply copy and paste in your C# project or application you and then run your app! If you want to use these C# sample examples in one or many applications then they can be used easily.
You can download free trial version of ByteScout Data Extraction Suite from our website to see and try many others source code samples for C#.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
using System; using System.Collections.Generic; using System.Text; using Bytescout.Spreadsheet; using System.Diagnostics; using System.IO; namespace Sample { class Program { static void Main(string[] args) { // Open existing Spreadsheets Spreadsheet document1 = new Spreadsheet(); document1.LoadFromFile("workbook1.xls"); Spreadsheet document2 = new Spreadsheet(); document2.LoadFromFile("workbook2.xls"); // Create output document Spreadsheet document3 = new Spreadsheet(); // Add new worksheet document3.Workbook.Worksheets.Add(); // Target row int targetRow = 0; // Copy cells from first document for (int i = 0; i < 10; i++) { for (int j = 0; j < 12; j++) { document3.Worksheet(0).Cell(targetRow, j).Value = document1.Worksheet(0).Cell(i, j).Value; } targetRow++; } // Copy cells from second document for (int i = 0; i < 10; i++) { for (int j = 0; j < 12; j++) { document3.Worksheet(0).Cell(targetRow, j).Value = document2.Worksheet(0).Cell(i, j).Value; } targetRow++; } // delete output file if exists already if (File.Exists("Output.xls")){ File.Delete("Output.xls"); } // Save document document3.SaveAs("output.xls"); // Close document document3.Close(); // Open document in default xls viewer Process.Start("Output.xls"); } } }
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: