Spreadsheet Integrator - Online Help
Available for:
Spreadsheet Integrator
Questions / Feedback?

MergeCells Method

Merges the specified range.

Syntax

[VB.NET]
Public Sub MergeCells(ByVal Cells As String)
[C#]
public void MergeCells(string cells);

Remarks

This method merges the range specified by the Cells parameter. The Cells parameter should be a range in A1 notation, for instance "A1:B3".

Once the cells are merged, setting Cell to any combination of cells that are part of the merged range will select the merged cell. For instance the output of the selected cell will be the same for all cases below:

Exceldoc1.MergeCells("A1:B3");

Exceldoc1.Cell = "A1";
Console.WriteLine(Exceldoc1.CellText);

Exceldoc1.Cell = "B2";
Console.WriteLine(Exceldoc1.CellText);

Exceldoc1.Cell = "A1:B3";
Console.WriteLine(Exceldoc1.CellText);

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 1.0.6240.0