Back to Devexpress

WorkbookExportOptions.CustomFunctionExportMode Property

officefileapi-devexpress-dot-xtraspreadsheet-dot-export-dot-workbookexportoptions.md

latest3.1 KB
Original Source

WorkbookExportOptions.CustomFunctionExportMode Property

Specifies whether custom function definitions should be replaced with the corresponding calculated values when exporting a document.

Namespace : DevExpress.XtraSpreadsheet.Export

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
[DefaultValue(CustomFunctionExportMode.Function)]
public CustomFunctionExportMode CustomFunctionExportMode { get; set; }
vb
<DefaultValue(CustomFunctionExportMode.Function)>
Public Property CustomFunctionExportMode As CustomFunctionExportMode

Property Value

TypeDefaultDescription
CustomFunctionExportModeFunction

A CustomFunctionExportMode enumerator value.

|

Available values:

NameDescription
CalculatedValue

Export values calculated from custom functions.

| | Function |

Export custom function definitions.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to CustomFunctionExportMode
DocumentOptions

.Export .CustomFunctionExportMode

|

Remarks

Custom functions are not saved in a workbook. So, if a worksheet that contains a custom function is loaded in a workbook that is not aware of the function (or in MS Excel), the “#NAME!” error is displayed after the cell containing the function has been re-evaluated. To avoid this situation, you can set the CustomFunctionExportMode option to CustomFunctionExportMode.CalculatedValue and custom functions will be converted to their calculated values when saving a document.

See Also

CustomFunctions

ICustomFunction

User-Defined Functions (UDF)

WorkbookExportOptions Class

WorkbookExportOptions Members

DevExpress.XtraSpreadsheet.Export Namespace