ByteScout Spreadsheet SDK – C# – Read Merged Cells

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Read Merged Cells

ByteScout Spreadsheet SDK – C# – Read Merged Cells

Program.cs

using System;
using System.Collections.Generic;
using System.Text;
using Bytescout.Spreadsheet;

namespace ReadingMergedCells
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create new Spreadsheet
            Spreadsheet document = new Spreadsheet();
document.LoadFromFile("Input.xls");

            // Get worksheet by name
            Worksheet worksheet = document.Workbook.Worksheets["Sheet1"];

            // Read merged cell
            Cell cell = worksheet.Cell("C12").MergedWithCell;

            // Read cell value
            Console.WriteLine(cell.Value);

            // Close document
            document.Close();
        }
    }
}


  Click here to get your Free Trial version of the SDK

prev
next