Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ExcelColumnStyleByHeaderBuilder

OfficeIMO.Excel

Namespace
OfficeIMO.Excel
Assembly
OfficeIMO.Excel
Source revision
0eef6a5756b9 with working tree changes
Modifiers
sealed

Builder for applying styles/number formats to a column resolved by header.

Inheritance

  • object
  • ExcelColumnStyleByHeaderBuilder

Usage

Explore 29 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 1

Methods

public ExcelColumnStyleByHeaderBuilder Currency(int decimals = 2, CultureInfo? culture = null) #

Applies a currency format using the specified culture.

Parameters

decimals int = 2 optional
Number of decimal places.
culture System.Globalization.CultureInfo? = null optional
Culture for currency symbol.
public ExcelColumnStyleByHeaderBuilder Date(string pattern = "yyyy-mm-dd") #

Applies a date format using the provided pattern.

Parameters

pattern string = "yyyy-mm-dd" optional
Date format pattern.
public ExcelColumnStyleByHeaderBuilder DateTime(string pattern = "yyyy-mm-dd hh:mm:ss") #

Applies a date and time format using the provided pattern.

Parameters

pattern string = "yyyy-mm-dd hh:mm:ss" optional
DateTime format pattern.
public ExcelColumnStyleByHeaderBuilder DurationHours() #

Applies a duration format in hours.

public ExcelColumnStyleByHeaderBuilder Integer() #

Applies an integer number format.

public ExcelColumnStyleByHeaderBuilder Number(int decimals = 0) #

Applies a numeric format with optional decimal places.

Parameters

decimals int = 0 optional
Number of decimal places.
public ExcelColumnStyleByHeaderBuilder Percent(int decimals = 0) #

Applies a percentage format.

Parameters

decimals int = 0 optional
Number of decimal places.
public ExcelColumnStyleByHeaderBuilder SetBold(bool bold = true) #

Sets or clears bold text.

Parameters

bold bool = true optional
public ExcelColumnStyleByHeaderBuilder SetBoldByTextSet(ISet<string> values, bool bold = true, bool caseInsensitive = true) #

Sets or clears bold where cell text is in the given set.

Parameters

values System.Collections.Generic.ISet<string> required
bold bool = true optional
caseInsensitive bool = true optional
public ExcelColumnStyleByHeaderBuilder SetBoldWhenTextEquals(string text, bool bold = true, bool caseInsensitive = true) #

Sets or clears bold where cell text equals the given value.

Parameters

text string required
bold bool = true optional
caseInsensitive bool = true optional
public ExcelColumnStyleByHeaderBuilder SetColor(OfficeColor color) #

Sets the literal or theme-based text color.

Parameters

color OfficeIMO.OfficeColor required
public ExcelColumnStyleByHeaderBuilder SetColorByTextMap(IDictionary<string, OfficeColor> map, bool caseInsensitive = true) #

Sets text colors by matching cell text to a color map.

Parameters

map System.Collections.Generic.IDictionary<string, OfficeIMO.OfficeColor> required
caseInsensitive bool = true optional
public ExcelColumnStyleByHeaderBuilder SetFillColor(OfficeColor color) #

Sets the literal or theme-based solid fill color.

Parameters

color OfficeIMO.OfficeColor required
public ExcelColumnStyleByHeaderBuilder SetFillColorByTextMap(IDictionary<string, OfficeColor> map, bool caseInsensitive = true) #

Sets fill colors by matching cell text to a color map.

Parameters

map System.Collections.Generic.IDictionary<string, OfficeIMO.OfficeColor> required
caseInsensitive bool = true optional
public ExcelColumnStyleByHeaderBuilder SetFillColorWhenTextEquals(string text, OfficeColor color, bool caseInsensitive = true) #

Sets a fill where cell text equals the given value. Comparison is case-insensitive by default.

Parameters

text string required
color OfficeIMO.OfficeColor required
caseInsensitive bool = true optional
public ExcelColumnStyleByHeaderBuilder SetFontFamily(string fontFamily) #

Sets the typeface family name.

Parameters

fontFamily string required
public ExcelColumnStyleByHeaderBuilder SetFontSize(OfficeLength fontSize) #

Sets a positive physical font size.

Parameters

fontSize OfficeIMO.OfficeLength required
public ExcelColumnStyleByHeaderBuilder SetHorizontalAlignment(ExcelHorizontalAlignment alignment) #

Sets horizontal alignment.

Parameters

alignment OfficeIMO.Excel.ExcelHorizontalAlignment required
public ExcelColumnStyleByHeaderBuilder SetItalic(bool italic = true) #

Sets or clears italic text.

Parameters

italic bool = true optional
public ExcelColumnStyleByHeaderBuilder SetNumberFormat(string format) #

Applies a custom number format without materializing a pending direct tabular export.

Parameters

format string required
public ExcelColumnStyleByHeaderBuilder SetStrikethrough(bool strikethrough = true) #

Sets or clears strikethrough.

Parameters

strikethrough bool = true optional
SetUnderline 3 overloads
public ExcelColumnStyleByHeaderBuilder SetUnderline() #

Applies single underline.

public ExcelColumnStyleByHeaderBuilder SetUnderline(bool underline) #

Sets or clears single underline.

Parameters

underline bool required
public ExcelColumnStyleByHeaderBuilder SetUnderline(ExcelUnderlineStyle underlineStyle) #

Sets the native Excel underline style.

Parameters

underlineStyle OfficeIMO.Excel.ExcelUnderlineStyle required
public ExcelColumnStyleByHeaderBuilder SetVerticalAlignment(ExcelVerticalAlignment alignment) #

Sets vertical alignment.

Parameters

alignment OfficeIMO.Excel.ExcelVerticalAlignment required
public ExcelColumnStyleByHeaderBuilder SetVerticalTextAlignment(ExcelVerticalTextAlignment alignment) #

Sets baseline, superscript or subscript text alignment.

Parameters

alignment OfficeIMO.Excel.ExcelVerticalTextAlignment required
public ExcelColumnStyleByHeaderBuilder SetWrapText(bool wrapText = true) #

Sets or clears text wrapping.

Parameters

wrapText bool = true optional
public ExcelColumnStyleByHeaderBuilder Text() #

Applies a text format.

public ExcelColumnStyleByHeaderBuilder Time() #

Applies a time format.