Method ReplacePlaceholders
ReplacePlaceholders(IReadOnlyDictionary<string, object?>, XlsxPlaceholderOptions?)
Fills the placeholders in the workbook's text cells from a dictionary. See ReplacePlaceholders(IReadOnlyDictionary<string, object?>, XlsxPlaceholderOptions?).
public XlsxPlaceholderResult ReplacePlaceholders(IReadOnlyDictionary<string, object?> values, XlsxPlaceholderOptions? options = null)
Parameters
valuesIReadOnlyDictionary<string, object>The value for each name.
optionsXlsxPlaceholderOptionsHow placeholders are written and filled, or null for the defaults.
Returns
- XlsxPlaceholderResult
How many were replaced, which names were and were not resolved, and the cells that could not be changed.
Exceptions
- ArgumentNullException
valuesis null.- ArgumentException
The prefix or the suffix is empty.
- InvalidDocumentException
A name has no key and the options say to throw (DXP1004); or a sheet's part is malformed.