Merge

function Merge(isAcross: boolean = null): void

Description

Merges the selected cell range into a single cell or a cell row.

Parameters

isAcrossbooleandefault: null

When set to true, the cells within the selected range will be merged along the rows, but remain split in the columns. When set to false, the whole selected range of cells will be merged into a single cell.

Returns

void

Try It

var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A3:E8").Merge(true);
oWorksheet.GetRange("A9:E14").Merge(false);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).