[]
Gets or sets whether user-defined but unused cell styles are excluded when saving the workbook to an XLSX file.
If this property is true, user-defined cell styles that are never applied in the workbook are omitted during export. The default value is false.
public bool ExcludeUnusedStyles { get; set; }
Public Property ExcludeUnusedStyles As Boolean
XlsxSaveOptions options = new XlsxSaveOptions();
options.ExcludeUnusedStyles = true;
bool excludeUnusedStyles = options.ExcludeUnusedStyles;
workbook.Save("path/to/output.xlsx", options);