Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Inserts a block of columns in the worksheet to the left of the specified column, copying the style based on the copyBehavior parameter.

Signature
C#
C#
 public void InsertColumns(int columnNumber, int columnCount, ColumnInsertBehavior columnCellsCopyBehavior, ColumnInsertBehavior columnCopyBehavior)
{signature}{signature:
}
Signature
vb.net
vb.net
Public Sub InsertColumns(ByVal columnNumber As Integer, ByVal columnCount As Integer, ByVal columnCellsCopyBehavior As ColumnInsertBehavior, ByVal columnCopyBehavior As ColumnInsertBehavior)
{signature}
{parameters}
{param:columnNumber}The 0\-based number of the column to insert.{param}
{param:columnCount}The number of columns to insert.{param}
{param:columnCellsCopyBehavior}The Style.ColumnInsertBehavior that defines the source style for each cell in the new column. Each cell in the new column will be given the style of its neighbor identified in this parameter.{param}
{param:columnCopyBehavior}The Style.ColumnInsertBehavior that defines how the default column style will be set for the new column. This style is cells before the 'columnCellsCopyBehavior', so the 'columnCellsCopyBehavior' can be used to override the column\-wide style.{param}
{example}{code:csharp|title=C#}
Parameters
Param
columnNumber
columnNumber

The 0-based number of the column to insert.

Param
columnCount
columnCount

The number of columns to insert.

Param
columnCellsCopyBehavior
columnCellsCopyBehavior

The Style.ColumnInsertBehavior that defines the source style for each cell in the new column. Each cell in the new column will be given the style of its neighbor identified in this parameter.

Param
columnCopyBehavior
columnCopyBehavior

The Style.ColumnInsertBehavior that defines how the default column style will be set for the new column. This style is cells before the 'columnCellsCopyBehavior', so the 'columnCellsCopyBehavior' can be used to override the column-wide style.

Example
Code Block
csharp
csharp
titleC#

ws.InsertColumn(3, 10, Style.InsertBehavior.CopyFromLeft);
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}

ws.InsertColumn(3, 10, Style.InsertBehavior.CopyFromLeft)
{code} {example}