OfficeIMO

API Reference

Class

PowerPointTable

Namespace OfficeIMO.PowerPoint
Assembly OfficeIMO.PowerPoint

Represents a table on a slide.

Inheritance

Methods

public Void AddColumn(Nullable<Int32> index = null) #
Returns: Void

Adds a new column to the table.

Parameters

index System.Nullable{System.Int32} = null optionalposition: 0
Optional zero-based index where the column should be inserted. If omitted, column is appended.
public PowerPointTableColumn AddColumnFromTemplate(Int32 templateColumnIndex, Nullable<Int32> index = null, Boolean clearText = true) #
Returns: PowerPointTableColumn

Adds a new column cloned from a template column.

Parameters

templateColumnIndex System.Int32 requiredposition: 0
index System.Nullable{System.Int32} = null optionalposition: 1
clearText System.Boolean = true optionalposition: 2
public Void AddRow(Nullable<Int32> index = null) #
Returns: Void

Adds a new row to the table.

Parameters

index System.Nullable{System.Int32} = null optionalposition: 0
Optional zero-based index where the row should be inserted. If omitted, row is appended.
public PowerPointTableRow AddRowFromTemplate(Int32 templateRowIndex, Nullable<Int32> index = null, Boolean clearText = true) #
Returns: PowerPointTableRow

Adds a new row cloned from a template row.

Parameters

templateRowIndex System.Int32 requiredposition: 0
index System.Nullable{System.Int32} = null optionalposition: 1
clearText System.Boolean = true optionalposition: 2
public Void ApplyStyle(PowerPointTableStylePreset preset) #
Returns: Void

Applies a style preset to the table.

Parameters

preset OfficeIMO.PowerPoint.PowerPointTableStylePreset requiredposition: 0
public Void ApplyStyleByName(String styleName, Boolean ignoreCase = true, Nullable<Boolean> firstRow = null, Nullable<Boolean> lastRow = null, Nullable<Boolean> firstColumn = null, Nullable<Boolean> lastColumn = null, Nullable<Boolean> bandedRows = null, Nullable<Boolean> bandedColumns = null) #
Returns: Void

Applies a table style by name, with optional banding/heading toggles.

Parameters

styleName System.String requiredposition: 0
ignoreCase System.Boolean = true optionalposition: 1
firstRow System.Nullable{System.Boolean} = null optionalposition: 2
lastRow System.Nullable{System.Boolean} = null optionalposition: 3
firstColumn System.Nullable{System.Boolean} = null optionalposition: 4
lastColumn System.Nullable{System.Boolean} = null optionalposition: 5
bandedRows System.Nullable{System.Boolean} = null optionalposition: 6
bandedColumns System.Nullable{System.Boolean} = null optionalposition: 7
ApplyToCells 2 overloads
public Void ApplyToCells(Action<PowerPointTableCell> action) #
Returns: Void

Applies an action to all cells in the table.

Parameters

action System.Action{OfficeIMO.PowerPoint.PowerPointTableCell} requiredposition: 0
public Void ApplyToCells(Int32 startRow, Int32 endRow, Int32 startColumn, Int32 endColumn, Action<PowerPointTableCell> action) #
Returns: Void

Applies an action to a rectangular range of cells.

Parameters

startRow System.Int32 requiredposition: 0
endRow System.Int32 requiredposition: 1
startColumn System.Int32 requiredposition: 2
endColumn System.Int32 requiredposition: 3
action System.Action{OfficeIMO.PowerPoint.PowerPointTableCell} requiredposition: 4
public Void ApplyToColumn(Int32 columnIndex, Action<PowerPointTableCell> action) #
Returns: Void

Applies an action to a specific column.

Parameters

columnIndex System.Int32 requiredposition: 0
action System.Action{OfficeIMO.PowerPoint.PowerPointTableCell} requiredposition: 1
public Void ApplyToRow(Int32 rowIndex, Action<PowerPointTableCell> action) #
Returns: Void

Applies an action to a specific row.

Parameters

rowIndex System.Int32 requiredposition: 0
action System.Action{OfficeIMO.PowerPoint.PowerPointTableCell} requiredposition: 1
public Void Bind<T>(IEnumerable<T> data, IEnumerable<PowerPointTableColumn<T>> columns, Boolean includeHeaders = true, Int32 startRow = 0, Int32 startColumn = 0) #
Returns: Void

Type Parameters

T

Parameters

data IEnumerable<T> requiredposition: 0
columns IEnumerable<PowerPointTableColumn<T>> requiredposition: 1
includeHeaders Boolean = true optionalposition: 2
startRow Int32 = 0 optionalposition: 3
startColumn Int32 = 0 optionalposition: 4
Bind``1(System.Collections.Generic.IEnumerable{``0} data, System.Collections.Generic.IEnumerable{OfficeIMO.PowerPoint.PowerPointTableColumn{``0}} columns, System.Boolean includeHeaders, System.Int32 startRow, System.Int32 startColumn) #

Binds data to the table, expanding rows/columns as needed.

Parameters

data System.Collections.Generic.IEnumerable{``0} required
columns System.Collections.Generic.IEnumerable{OfficeIMO.PowerPoint.PowerPointTableColumn{``0}} required
includeHeaders System.Boolean required
startRow System.Int32 required
startColumn System.Int32 required
public Void ClearCellBorders(TableCellBorders borders) #
Returns: Void

Clears borders for all cells.

Parameters

borders OfficeIMO.PowerPoint.TableCellBorders requiredposition: 0
public PowerPointTableCell GetCell(Int32 row, Int32 column) #
Returns: PowerPointTableCell

Retrieves a cell at the specified row and column index.

Parameters

row System.Int32 requiredposition: 0
Zero-based row index.
column System.Int32 requiredposition: 1
Zero-based column index.
public PowerPointTableColumn GetColumn(Int32 columnIndex) #
Returns: PowerPointTableColumn

Retrieves a column wrapper at the specified index.

Parameters

columnIndex System.Int32 requiredposition: 0
public Int64 GetColumnWidth(Int32 columnIndex) #
Returns: Int64

Gets the width of a specific column in EMUs.

Parameters

columnIndex System.Int32 requiredposition: 0
public Double GetColumnWidthCm(Int32 columnIndex) #
Returns: Double

Gets the width of a specific column in centimeters.

Parameters

columnIndex System.Int32 requiredposition: 0
public Double GetColumnWidthInches(Int32 columnIndex) #
Returns: Double

Gets the width of a specific column in inches.

Parameters

columnIndex System.Int32 requiredposition: 0
public Double GetColumnWidthPoints(Int32 columnIndex) #
Returns: Double

Gets the width of a specific column in points.

Parameters

columnIndex System.Int32 requiredposition: 0
public PowerPointTableRow GetRow(Int32 rowIndex) #
Returns: PowerPointTableRow

Retrieves a row wrapper at the specified index.

Parameters

rowIndex System.Int32 requiredposition: 0
public Int64 GetRowHeight(Int32 rowIndex) #
Returns: Int64

Gets the height of a specific row in EMUs.

Parameters

rowIndex System.Int32 requiredposition: 0
public Double GetRowHeightCm(Int32 rowIndex) #
Returns: Double

Gets the height of a specific row in centimeters.

Parameters

rowIndex System.Int32 requiredposition: 0
public Double GetRowHeightInches(Int32 rowIndex) #
Returns: Double

Gets the height of a specific row in inches.

Parameters

rowIndex System.Int32 requiredposition: 0
public Double GetRowHeightPoints(Int32 rowIndex) #
Returns: Double

Gets the height of a specific row in points.

Parameters

rowIndex System.Int32 requiredposition: 0
public Void MergeCells(Int32 startRow, Int32 startColumn, Int32 endRow, Int32 endColumn, Boolean clearMergedContent = true) #
Returns: Void

Merges a rectangular range of cells into the top-left cell.

Parameters

startRow System.Int32 requiredposition: 0
Zero-based start row.
startColumn System.Int32 requiredposition: 1
Zero-based start column.
endRow System.Int32 requiredposition: 2
Zero-based end row.
endColumn System.Int32 requiredposition: 3
Zero-based end column.
clearMergedContent System.Boolean = true optionalposition: 4
Whether to clear text from merged cells.
public Void RemoveColumn(Int32 index) #
Returns: Void

Removes a column at the specified index.

Parameters

index System.Int32 requiredposition: 0
Zero-based index of the column to remove.
public Void RemoveRow(Int32 index) #
Returns: Void

Removes a row at the specified index.

Parameters

index System.Int32 requiredposition: 0
Zero-based index of the row to remove.
SetCellAlignment 2 overloads
public Void SetCellAlignment(Nullable<TextAlignmentTypeValues> horizontal, Nullable<TextAnchoringTypeValues> vertical) #
Returns: Void

Sets cell alignment for all cells.

Parameters

horizontal System.Nullable{DocumentFormat.OpenXml.Drawing.TextAlignmentTypeValues} requiredposition: 0
vertical System.Nullable{DocumentFormat.OpenXml.Drawing.TextAnchoringTypeValues} requiredposition: 1
public Void SetCellAlignment(Nullable<TextAlignmentTypeValues> horizontal, Nullable<TextAnchoringTypeValues> vertical, Int32 startRow, Int32 endRow, Int32 startColumn, Int32 endColumn) #
Returns: Void

Sets cell alignment for a range of cells.

Parameters

horizontal System.Nullable{DocumentFormat.OpenXml.Drawing.TextAlignmentTypeValues} requiredposition: 0
vertical System.Nullable{DocumentFormat.OpenXml.Drawing.TextAnchoringTypeValues} requiredposition: 1
startRow System.Int32 requiredposition: 2
endRow System.Int32 requiredposition: 3
startColumn System.Int32 requiredposition: 4
endColumn System.Int32 requiredposition: 5
SetCellBorders 2 overloads
public Void SetCellBorders(TableCellBorders borders, String color, Nullable<Double> widthPoints = null) #
Returns: Void

Applies borders to all cells.

Parameters

borders OfficeIMO.PowerPoint.TableCellBorders requiredposition: 0
color System.String requiredposition: 1
widthPoints System.Nullable{System.Double} = null optionalposition: 2
public Void SetCellBorders(TableCellBorders borders, String color, Nullable<Double> widthPoints, PresetLineDashValues dash) #
Returns: Void

Applies dashed borders to all cells.

Parameters

borders OfficeIMO.PowerPoint.TableCellBorders requiredposition: 0
color System.String requiredposition: 1
widthPoints System.Nullable{System.Double} requiredposition: 2
dash DocumentFormat.OpenXml.Drawing.PresetLineDashValues requiredposition: 3
public Void SetCellPaddingCm(Nullable<Double> leftCm, Nullable<Double> topCm, Nullable<Double> rightCm, Nullable<Double> bottomCm) #
Returns: Void

Sets cell padding in centimeters for all cells.

Parameters

leftCm System.Nullable{System.Double} requiredposition: 0
topCm System.Nullable{System.Double} requiredposition: 1
rightCm System.Nullable{System.Double} requiredposition: 2
bottomCm System.Nullable{System.Double} requiredposition: 3
public Void SetCellPaddingInches(Nullable<Double> leftInches, Nullable<Double> topInches, Nullable<Double> rightInches, Nullable<Double> bottomInches) #
Returns: Void

Sets cell padding in inches for all cells.

Parameters

leftInches System.Nullable{System.Double} requiredposition: 0
topInches System.Nullable{System.Double} requiredposition: 1
rightInches System.Nullable{System.Double} requiredposition: 2
bottomInches System.Nullable{System.Double} requiredposition: 3
SetCellPaddingPoints 2 overloads
public Void SetCellPaddingPoints(Nullable<Double> left, Nullable<Double> top, Nullable<Double> right, Nullable<Double> bottom) #
Returns: Void

Sets cell padding in points for all cells.

Parameters

left System.Nullable{System.Double} requiredposition: 0
top System.Nullable{System.Double} requiredposition: 1
right System.Nullable{System.Double} requiredposition: 2
bottom System.Nullable{System.Double} requiredposition: 3
public Void SetCellPaddingPoints(Nullable<Double> left, Nullable<Double> top, Nullable<Double> right, Nullable<Double> bottom, Int32 startRow, Int32 endRow, Int32 startColumn, Int32 endColumn) #
Returns: Void

Sets cell padding in points for a range of cells.

Parameters

left System.Nullable{System.Double} requiredposition: 0
top System.Nullable{System.Double} requiredposition: 1
right System.Nullable{System.Double} requiredposition: 2
bottom System.Nullable{System.Double} requiredposition: 3
startRow System.Int32 requiredposition: 4
endRow System.Int32 requiredposition: 5
startColumn System.Int32 requiredposition: 6
endColumn System.Int32 requiredposition: 7
public Void SetColumnWidth(Int32 columnIndex, Int64 width) #
Returns: Void

Sets the width of a specific column in EMUs.

Parameters

columnIndex System.Int32 requiredposition: 0
width System.Int64 requiredposition: 1
public Void SetColumnWidthCm(Int32 columnIndex, Double widthCm) #
Returns: Void

Sets the width of a specific column in centimeters.

Parameters

columnIndex System.Int32 requiredposition: 0
widthCm System.Double requiredposition: 1
public Void SetColumnWidthInches(Int32 columnIndex, Double widthInches) #
Returns: Void

Sets the width of a specific column in inches.

Parameters

columnIndex System.Int32 requiredposition: 0
widthInches System.Double requiredposition: 1
public Void SetColumnWidthPoints(Int32 columnIndex, Double widthPoints) #
Returns: Void

Sets the width of a specific column in points.

Parameters

columnIndex System.Int32 requiredposition: 0
widthPoints System.Double requiredposition: 1
public Void SetColumnWidthsByRatio(params Double[] ratios) #
Returns: Void

Sets column widths proportionally using ratios.

Parameters

ratios System.Double[] requiredposition: 0
public Void SetColumnWidthsCm(params Double[] widthsCm) #
Returns: Void

Sets widths for columns in centimeters (applies to the first N columns provided).

Parameters

widthsCm System.Double[] requiredposition: 0
public Void SetColumnWidthsEvenly() #
Returns: Void

Sets column widths evenly across the table width.

public Void SetColumnWidthsInches(params Double[] widthsInches) #
Returns: Void

Sets widths for columns in inches (applies to the first N columns provided).

Parameters

widthsInches System.Double[] requiredposition: 0
public Void SetColumnWidthsPoints(params Double[] widthsPoints) #
Returns: Void

Sets widths for columns in points (applies to the first N columns provided).

Parameters

widthsPoints System.Double[] requiredposition: 0
public Void SetRowHeight(Int32 rowIndex, Int64 height) #
Returns: Void

Sets the height of a specific row in EMUs.

Parameters

rowIndex System.Int32 requiredposition: 0
height System.Int64 requiredposition: 1
public Void SetRowHeightCm(Int32 rowIndex, Double heightCm) #
Returns: Void

Sets the height of a specific row in centimeters.

Parameters

rowIndex System.Int32 requiredposition: 0
heightCm System.Double requiredposition: 1
public Void SetRowHeightInches(Int32 rowIndex, Double heightInches) #
Returns: Void

Sets the height of a specific row in inches.

Parameters

rowIndex System.Int32 requiredposition: 0
heightInches System.Double requiredposition: 1
public Void SetRowHeightPoints(Int32 rowIndex, Double heightPoints) #
Returns: Void

Sets the height of a specific row in points.

Parameters

rowIndex System.Int32 requiredposition: 0
heightPoints System.Double requiredposition: 1
public Void SetRowHeightsByRatio(params Double[] ratios) #
Returns: Void

Sets row heights proportionally using ratios.

Parameters

ratios System.Double[] requiredposition: 0
public Void SetRowHeightsCm(params Double[] heightsCm) #
Returns: Void

Sets heights for rows in centimeters (applies to the first N rows provided).

Parameters

heightsCm System.Double[] requiredposition: 0
public Void SetRowHeightsEvenly() #
Returns: Void

Sets row heights evenly across the table height.

public Void SetRowHeightsInches(params Double[] heightsInches) #
Returns: Void

Sets heights for rows in inches (applies to the first N rows provided).

Parameters

heightsInches System.Double[] requiredposition: 0
public Void SetRowHeightsPoints(params Double[] heightsPoints) #
Returns: Void

Sets heights for rows in points (applies to the first N rows provided).

Parameters

heightsPoints System.Double[] requiredposition: 0
public Boolean TryApplyStyleByName(String styleName, Boolean ignoreCase = true, Nullable<Boolean> firstRow = null, Nullable<Boolean> lastRow = null, Nullable<Boolean> firstColumn = null, Nullable<Boolean> lastColumn = null, Nullable<Boolean> bandedRows = null, Nullable<Boolean> bandedColumns = null) #
Returns: Boolean

Tries to apply a table style by name. Returns false if the style is not found.

Parameters

styleName System.String requiredposition: 0
ignoreCase System.Boolean = true optionalposition: 1
firstRow System.Nullable{System.Boolean} = null optionalposition: 2
lastRow System.Nullable{System.Boolean} = null optionalposition: 3
firstColumn System.Nullable{System.Boolean} = null optionalposition: 4
lastColumn System.Nullable{System.Boolean} = null optionalposition: 5
bandedRows System.Nullable{System.Boolean} = null optionalposition: 6
bandedColumns System.Nullable{System.Boolean} = null optionalposition: 7

Properties

public Int32 Rows { get; } #

Returns number of rows in the table.

public Int32 Columns { get; } #

Returns number of columns in the table.

public IReadOnlyList<PowerPointTableRow> RowItems { get; } #

Row wrappers for the table.

public IReadOnlyList<PowerPointTableColumn> ColumnItems { get; } #

Column wrappers for the table.

public Boolean HeaderRow { get; set; } #

Enables or disables header row styling (firstRow attribute) on the table.

public Boolean FirstRow { get; set; } #

Enables or disables first row styling on the table.

public Boolean LastRow { get; set; } #

Enables or disables last row styling on the table.

public Boolean FirstColumn { get; set; } #

Enables or disables first column styling on the table.

public Boolean LastColumn { get; set; } #

Enables or disables last column styling on the table.

public Boolean BandedRows { get; set; } #

Enables or disables banded rows styling (bandRow attribute) on the table.

public Boolean BandedColumns { get; set; } #

Enables or disables banded columns styling (bandCol attribute) on the table.

public String StyleId { get; set; } #

Gets or sets the table style ID GUID.