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
vb.net
vb.net
Public Sub InsertColumns(ByVal columnNumber As Integer, ByVal columnCount As Integer, ByVal columnCellsCopyBehavior As ColumnInsertBehavior, ByVal columnCopyBehavior As ColumnInsertBehavior)
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 Block
vb.net
vb.net
titlevb.net
ws.InsertColumn(3, 10, Style.InsertBehavior.CopyFromLeft)