Hi.
I’ve tring mergeCells using macro… but when i’ve two merge cell in sequence, both for column and for row, the macro is falling.
I’ve tring in demos but recive the same error.
macro exemple:
// INIT MACRO
var oDocument = Api.GetDocument();
var oSection = oDocument.GetFinalSection();
var nWidth = oSection.GetPageWidth();
var oTable = Api.CreateTable(6, 1);
oTable.SetWidth("twips", 6912);
var oTableRow = oTable.GetRow(0);
oTableRow.SetHeight("atLeast", 320)
// GET CELL 0,0
var oCell00 = oTable.MergeCells([oTable.GetRow(0).GetCell(0),oTable.GetRow(0).GetCell(1),oTable.GetRow(0).GetCell(2)]);
var oCellContent00 = oCell00.GetContent();
var oCellElement00 = oCellContent00.GetElement(0);
oCellElement00.AddText('MERGE MESMA LINHA');
// ADD CELL TEXT STYLES
oCellElement00.SetFontSize(22)
oCellElement00.SetFontFamily('Calibri, "sans-serif"')
oCellElement00.SetJc('center')
// ADD CELL STYLES
oCell00.SetVerticalAlign('bottom');
oTable.AddElement(oCell00, 0, oCellContent00);
// GET CELL 0,3
var oCell30 = oTable.MergeCells([oTable.GetRow(0).GetCell(3),oTable.GetRow(0).GetCell(4),oTable.GetRow(0).GetCell(5)]);
var oCellContent30 = oCell30.GetContent();
var oCellElement30 = oCellContent30.GetElement(0);
oCellElement30.AddText('LINHA AO LADO');
// ADD CELL TEXT STYLES
oCellElement30.SetFontSize(22)
oCellElement30.SetFontFamily('Calibri, "sans-serif"')
oCellElement30.SetJc('center')
// ADD CELL STYLES
oCell30.SetVerticalAlign('bottom');
oTable.AddElement(oCell30, 0, oCellContent30);
oDocument.InsertContent([oTable]);