Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Fri May 13, 2011 1:12 pm

Within Spire.Doc.Table do you have a code example of column span.

Posts: 3
Joined: Wed Mar 09, 2011 2:56 pm

Tue May 17, 2011 2:43 am

Dear jdupee,
Thanks for your inqury!You can do it like this:
Code: Select all
Spire.Doc.Table table = section.AddTable();
            table.ResetCells(data.Length + 1, header.Length);
            table.ApplyHorizontalMerge(1, 2, 4); //or//table.ApplyVerticalMerge(1, 2, 4);

Use the fuction ApplyHorizontalMerge(int rowIndex, int startCellIndex, int endCellIndex) you can add Row Span,the fuction ApplyVerticalMerge(int columnIndex, int startRowIndex, int endRowIndex) you can add Column Span!
Technical Support / Developer,
e-iceblue Support Team
User avatar

Justin Weng
Posts: 110
Joined: Mon Mar 28, 2011 5:54 am

Return to Spire.Doc