The Auto-Format Formula feature in Spread for WPF automatically formats the result values based on the data type returned by a formula, similar to Excel 2019 and Excel for Office 365. This functionality simplifies formatting by dynamically adjusting it according to the formula's output.
To enable the auto-format feature, you can set the AutoFormatting property of the Features class. Depending on the function arguments, the return value could be a date, number, or cell reference, and the corresponding format is applied automatically.
The following image illustrates how formulas are automatically formatted when the AutoFormatting feature is enabled or disabled.
![]() |
![]() |
Refer to the following example code to set the AutoFormatting property to true, enabling automatic formatting of formulas based on the returned data type.