PicoXLSX Library Documentation
![]() | WorkbookRemoveStyle Method (String, Boolean) |
Removes the defined style from the style sheet of the workbook
Namespace: PicoXLSX
Assembly: PicoXLSX (in PicoXLSX.dll) Version: 2.4.0.0 (2.4.0)

C#
public void RemoveStyle( string styleName, bool onlyIfUnused )
Parameters
- styleName
- Type: SystemString
Name of the style to be removed - onlyIfUnused
- Type: SystemBoolean
If true, the style will only be removed if not used in any cell

Exception | Condition |
---|---|
StyleException | Throws an UndefinedStyleException if the style was not found in the style collection (could not be referenced) |
