New to Telerik Document ProcessingStart a free 30-day trial

JsonExportSettings

Updated on May 11, 2026

The JsonFormatProvider exposes an ExportSettings property of type JsonExportSettings. The settings control the behavior of the JsonFormatProvider when exporting a Workbook to JSON. By adjusting the available properties you can tailor the size, richness and focus of the generated JSON payload.

Properties

PropertyTypeDefaultDescription
ExportWhatExportWhatEntireWorkbookPortion of the workbook to export (entire workbook, active sheet, or selection).
IncludeHiddenSheetsboolfalseInclude hidden worksheets when exporting the entire workbook.
IncludeDefinedNamesbooltrueExport defined names (named ranges / constants).
IncludeNumberFormatsbooltrueEmit number format codes for formatted cells.
IncludeChartsbooltrueSerialize chart objects from exported sheets.
ChartDataModeChartDataModeReferencesOnlyControl chart data representation: only reference formulas, only resolved literal values, or both.
PrettyPrintboolfalseIndent JSON output for readability. Disable to reduce size.
ValueRenderModeValueRenderModeDisplayExport raw underlying values, formatted display values, or both.
IncludeBlankCellsboolfalseEmit blank cells explicitly within the used range; otherwise they are skipped.
IncludeWorkbookProtectionFlagbooltrueInclude workbook protection state (Workbook.IsProtected).
IncludeActiveSheetbooltrueEmit the name of the active worksheet in metadata.
SelectedRangesList<CellRange>emptyRanges to export when ExportWhat is Selection. Empty collection falls back to active sheet.
IncludeChartStatsbooltrueInclude min, max, average, sum, stdev and count aggregates for chart series.
IncludeChartSummariesbooltrueInclude natural language summary strings per chart.
IncludeChartTrendsbooltrueInclude simple trend classification (increasing / decreasing / flat) for eligible series.

Enum Values

ExportWhat

ValueDescription
ActiveSheetExports only the currently active worksheet.
EntireWorkbookExports all worksheets in the workbook. (Default)
SelectionExports only the currently selected cell ranges.

ChartDataMode

ValueDescription
ReferencesOnlyOnly formula/reference expressions are exported. (Default)
ResolvedValuesOnly resolved literal value arrays are exported.
BothBoth references and resolved value arrays are exported.

ValueRenderMode

ValueDescription
RawUnderlying raw cell value is exported.
DisplayFormatted display value is exported. (Default)
BothBoth raw and display representations are exported.

Basic Usage

The following example shows how you can create a JsonExportSettings instance with the desired settings while exporting a Workbook to JSON format:

C#
Workbook workbook;
XlsxFormatProvider xlsxFormatProvider = new XlsxFormatProvider();

using (Stream input = new FileStream("inputFile.xlsx", FileMode.Open))
{
    workbook = xlsxFormatProvider.Import(input, TimeSpan.FromSeconds(10));
}

string jsonOutputPath = "outputFile.json";
JsonFormatProvider jsonFormatProvider = new JsonFormatProvider();

JsonExportSettings jsonExportSettings = new JsonExportSettings
{
    ExportWhat = ExportWhat.EntireWorkbook,
    IncludeWorkbookProtectionFlag = true,
    IncludeNumberFormats = true,
    IncludeActiveSheet = true,
    IncludeBlankCells = true,
    ValueRenderMode = ValueRenderMode.Raw,
    PrettyPrint = true,
    IncludeHiddenSheets = true,
    ChartDataMode = ChartDataMode.ReferencesOnly,
    IncludeCharts = true,
    IncludeChartStats = true,
    IncludeChartSummaries = true,
    IncludeChartTrends = true,
    IncludeDefinedNames = true
};

jsonFormatProvider.ExportSettings = jsonExportSettings;

using (Stream output = new FileStream(jsonOutputPath, FileMode.Create))
{
    jsonFormatProvider.Export(workbook, output, TimeSpan.FromSeconds(10));
}

See Also