Version

StartTable(IList<Single>,TableProperties) Method

Starts a new table in the document with the number of columns equal to the number of elements in the specified columnWidths list, and with the width of each column defined by the corresponding value in the list.
Syntax
'Declaration
 
Public Overloads Overrides Sub StartTable( _
   ByVal columnWidths As IList(Of Single), _
   ByVal properties As TableProperties _
) 
public override void StartTable( 
   IList<float> columnWidths,
   TableProperties properties
)

Parameters

columnWidths
A list of values which contains the width for each column to be added. The number of columns is determined by the number of elements in the list. The unit of measure for each value in the list is determined by the value of the Unit property.
properties
A reference to a TableProperties instance which defines formatting attributes for the table.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionThrown if the value of the columnWidths parameter is null.
System.ArgumentOutOfRangeExceptionThrown if the list referenced by the columnWidths parameter is empty.
WordDocumentWriterExceptionThrown if no document is currently open.
Remarks

This method starts a <tbl> element. Callers are responsible for closing this element. The <tbl> element can be closed by calling the EndTable method.

A table must contain at least one and no more than 63 columns; specifying a value outside this range results in an exception being thrown.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also