ByteScout Barcode Suite - C# - Merge cells with spreadsheet sdk - ByteScout

ByteScout Barcode Suite – C# – Merge cells with spreadsheet sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Suite – C# – Merge cells with spreadsheet sdk

How to merge cells with spreadsheet sdk in C# with ByteScout Barcode Suite

How to write a robust code in C# to merge cells with spreadsheet sdk with this step-by-step tutorial

The sample shows instructions and algorithm of how to merge cells with spreadsheet sdk and how to make it run in your C# application. ByteScout Barcode Suite is the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK. It can merge cells with spreadsheet sdk in C#.

Want to save time? You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout Barcode Suite for merge cells with spreadsheet sdk below and use it in your application. Follow the instructions from scratch to work and copy the C# code. This basic programming language sample code for C# will do the whole work for you to merge cells with spreadsheet sdk.

ByteScout provides the free trial version of ByteScout Barcode Suite along with the documentation and source code samples.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.Collections.Generic; using System.Text; using Bytescout.Spreadsheet; using System.Diagnostics; using System.IO; namespace MergeCells { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Get worksheet by name Worksheet worksheet = document.Workbook.Worksheets.Add("Sheet1"); // Merge cells worksheet.Range("B6:D18").Merge(); // Write text worksheet.Cell("C10").MergedWithCell.Value = "Bytescout.Spreadsheet"; // delete output file if exists already if (File.Exists("Output.xls")){ File.Delete("Output.xls"); } // Save document document.SaveAs("Output.xls"); // Close document document.Close(); // Open document in default xls viewer Process.Start("Output.xls"); } } }

ON-PREMISE OFFLINE SDK

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

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

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

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next