Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PowerPointTableCell

OfficeIMO.PowerPoint

Namespace
OfficeIMO.PowerPoint
Assembly
OfficeIMO.PowerPoint
Source revision
0eef6a5756b9 with working tree changes

Represents a cell within a PowerPoint table.

Inheritance

  • object
  • PowerPointTableCell

Usage

Explore 14 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 3

Methods

public PowerPointParagraph AddBullet(string text, char bulletChar = '•', int level = 0, Action<PowerPointParagraph>? configure = null) #

Adds a bulleted paragraph to the table cell.

Parameters

text string required
bulletChar char = '•' optional
level int = 0 optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional
public IReadOnlyList<PowerPointParagraph> AddBullets(IEnumerable<string> bullets, int level = 0, char bulletChar = '•', Action<PowerPointParagraph>? configure = null) #

Adds a bulleted list to the table cell.

Parameters

bullets System.Collections.Generic.IEnumerable<string> required
level int = 0 optional
bulletChar char = '•' optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
AddNumberedItem 2 overloads
public PowerPointParagraph AddNumberedItem(string text, PowerPointNumberingScheme style, int startAt = 1, int level = 0, Action<PowerPointParagraph>? configure = null) #

Adds a numbered paragraph to the table cell.

Parameters

text string required
style OfficeIMO.PowerPoint.PowerPointNumberingScheme required
startAt int = 1 optional
level int = 0 optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional
public PowerPointParagraph AddNumberedItem(string text, int startAt = 1, int level = 0, Action<PowerPointParagraph>? configure = null) #

Adds a numbered paragraph to the table cell using the default numbering style.

Parameters

text string required
startAt int = 1 optional
level int = 0 optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional
AddNumberedList 2 overloads
public IReadOnlyList<PowerPointParagraph> AddNumberedList(IEnumerable<string> items, PowerPointNumberingScheme style, int startAt = 1, int level = 0, Action<PowerPointParagraph>? configure = null) #

Adds a numbered list to the table cell.

Parameters

items System.Collections.Generic.IEnumerable<string> required
style OfficeIMO.PowerPoint.PowerPointNumberingScheme required
startAt int = 1 optional
level int = 0 optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
public IReadOnlyList<PowerPointParagraph> AddNumberedList(IEnumerable<string> items, int startAt = 1, int level = 0, Action<PowerPointParagraph>? configure = null) #

Adds a numbered list to the table cell using the default numbering style.

Parameters

items System.Collections.Generic.IEnumerable<string> required
startAt int = 1 optional
level int = 0 optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
public PowerPointParagraph AddParagraph(string text = "", Action<PowerPointParagraph>? configure = null, Action<PowerPointTextRun>? run = null) #

Adds a paragraph to the table cell.

Parameters

text string = "" optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional
run System.Action<OfficeIMO.PowerPoint.PowerPointTextRun>? = null optional
public IReadOnlyList<PowerPointParagraph> AddParagraphs(IEnumerable<string> paragraphs, Action<PowerPointParagraph>? configure = null) #

Adds multiple paragraphs to the table cell.

Parameters

paragraphs System.Collections.Generic.IEnumerable<string> required
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
public PowerPointTextRun AddText(string text) #

Appends text as a new run in the first cell paragraph and returns that run.

Parameters

text string required
public void ClearBorders(PowerPointTableCellBorders borders) #

Clears borders on the specified sides.

Parameters

borders OfficeIMO.PowerPoint.PowerPointTableCellBorders required
public void HideBorders(PowerPointTableCellBorders borders) #

Explicitly hides the selected borders, overriding inherited table styling. PowerPointTableCell.ClearBorders removes the local declarations and allows style inheritance instead.

Parameters

borders OfficeIMO.PowerPoint.PowerPointTableCellBorders required
public int ReplaceAll(string text, string replacement, OfficeTextSearchOptions? options = null) #

Replaces literal text in the cell paragraphs.

Parameters

text string required
Text to find.
replacement string required
Replacement text; null removes each match.
options OfficeIMO.OfficeTextSearchOptions? = null optional
Comparison settings. null matches ordinally, ignoring case, inside or across words.

Returns

int The number of replaced matches.
public PowerPointTableCell SetBold(bool bold = true) #

Sets PowerPointTableCell.Bold for the entire cell and returns this instance.

Parameters

bold bool = true optional
public void SetBorders(PowerPointTableCellBorders borders, OfficeColor color, OfficeLength? width = null, PowerPointLineDashStyle? dash = null) #

Applies border styling, retaining the existing width or dash when omitted.

Parameters

borders OfficeIMO.PowerPoint.PowerPointTableCellBorders required
color OfficeIMO.OfficeColor required
width OfficeIMO.OfficeLength? = null optional
dash OfficeIMO.PowerPoint.PowerPointLineDashStyle? = null optional
public IReadOnlyList<PowerPointParagraph> SetBullets(IEnumerable<string> bullets, int level = 0, char bulletChar = '•', Action<PowerPointParagraph>? configure = null) #

Replaces all table-cell paragraphs with a bulleted list.

Parameters

bullets System.Collections.Generic.IEnumerable<string> required
level int = 0 optional
bulletChar char = '•' optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
public PowerPointTableCell SetColor(OfficeColor? color) #

Sets PowerPointTableCell.Color for the entire cell and returns this instance.

Parameters

color OfficeIMO.OfficeColor? required
public PowerPointTableCell SetFontFamily(string? fontFamily) #

Sets PowerPointTableCell.FontFamily for the entire cell and returns this instance.

Parameters

fontFamily string? required
public PowerPointTableCell SetFontSize(OfficeLength? fontSize) #

Sets PowerPointTableCell.FontSize for the entire cell and returns this instance.

Parameters

fontSize OfficeIMO.OfficeLength? required
public PowerPointTableCell SetItalic(bool italic = true) #

Sets PowerPointTableCell.Italic for the entire cell and returns this instance.

Parameters

italic bool = true optional
SetNumberedList 2 overloads
public IReadOnlyList<PowerPointParagraph> SetNumberedList(IEnumerable<string> items, PowerPointNumberingScheme style, int startAt = 1, int level = 0, Action<PowerPointParagraph>? configure = null) #

Replaces all table-cell paragraphs with a numbered list.

Parameters

items System.Collections.Generic.IEnumerable<string> required
style OfficeIMO.PowerPoint.PowerPointNumberingScheme required
startAt int = 1 optional
level int = 0 optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
public IReadOnlyList<PowerPointParagraph> SetNumberedList(IEnumerable<string> items, int startAt = 1, int level = 0, Action<PowerPointParagraph>? configure = null) #

Replaces all table-cell paragraphs with a numbered list using the default numbering style.

Parameters

items System.Collections.Generic.IEnumerable<string> required
startAt int = 1 optional
level int = 0 optional
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
public IReadOnlyList<PowerPointParagraph> SetParagraphs(IEnumerable<string> paragraphs, Action<PowerPointParagraph>? configure = null) #

Replaces all table-cell paragraphs with the provided content.

Parameters

paragraphs System.Collections.Generic.IEnumerable<string> required
configure System.Action<OfficeIMO.PowerPoint.PowerPointParagraph>? = null optional

Returns

IReadOnlyList<PowerPointParagraph>
public PowerPointTableCell SetTextAutoFit(PowerPointTextAutoFit fit, PowerPointTextAutoFitOptions? options = null) #

Sets the auto-fit mode and optional Normal auto-fit options.

Parameters

fit OfficeIMO.PowerPoint.PowerPointTextAutoFit required
options OfficeIMO.PowerPoint.PowerPointTextAutoFitOptions? = null optional

Properties

public string Text { get; set; } #

Gets or sets the text contained in the cell.

public ValueTuple<int, int> Merge { get; set; } #

Gets or sets the merge information for this cell. Tuple is in format (rows, columns).

public PowerPointTextAlignment? HorizontalAlignment { get; set; } #

Gets or sets the horizontal alignment of the cell text.

public OfficeColor? BorderColor { get; set; } #

Gets or sets the local border color (all sides), retaining native theme slots and opacity.

public bool IsMergedCell { get; } #

Gets a value indicating whether this cell is a merged continuation cell.

public bool IsMergeAnchor { get; } #

Gets a value indicating whether this cell is the anchor for a merged range.

public IReadOnlyList<PowerPointTextRun> Runs { get; } #

Gets formatted runs from the first cell paragraph.

public bool Bold { get; set; } #

Gets or sets whether the cell text is bold. Setting applies to every run and line break in the cell.

public bool Italic { get; set; } #

Gets or sets whether the cell text is italic.

public OfficeLength? FontSize { get; set; } #

Gets or sets the font size as a physical length.

public string? FontFamily { get; set; } #

Gets or sets the font family.

public OfficeColor? Color { get; set; } #

Gets or sets the text color. Alpha below 255 is written as native DrawingML opacity.

public OfficeLength? PaddingLeft { get; set; } #

Gets or sets the left padding as a physical length.

public OfficeLength? PaddingRight { get; set; } #

Gets or sets the right padding as a physical length.

public OfficeLength? PaddingTop { get; set; } #

Gets or sets the top padding as a physical length.

public OfficeLength? PaddingBottom { get; set; } #

Gets or sets the bottom padding as a physical length.

public PowerPointTextVerticalAlignment? VerticalAlignment { get; set; } #

Gets or sets the vertical alignment of the cell text (top/center/bottom).

public PowerPointTextAutoFit? TextAutoFit { get; set; } #

Gets or sets the text auto-fit behavior for the cell.

public PowerPointTextAutoFitOptions? TextAutoFitOptions { get; set; } #

Gets or sets detailed auto-fit options (only applies to Normal auto-fit).

public OfficeColor? FillColor { get; set; } #

Gets or sets the local cell fill. Setting a color replaces other local fill choices. Null removes the local solid fill and allows the remaining local or table style fill to apply.

public bool NoFill { get; set; } #

Gets or sets an explicit transparent cell fill that suppresses the table style fill. Setting true replaces other local fill choices; setting false removes the no-fill override.

public IReadOnlyList<PowerPointParagraph> Paragraphs { get; } #

Gets the paragraphs contained in the table cell.