ClassJsonFormatProvider
A workbook format provider that exports spreadsheet content to a structured JSON representation. This provider is export-only; importing JSON back into a workbook is not supported.
Definition
Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders.Json
Assembly:Telerik.Windows.Documents.Spreadsheet.FormatProviders.Json.dll
Syntax:
public class JsonFormatProvider : BinaryWorkbookFormatProviderBase, IBinaryWorkbookFormatProvider, IWorkbookFormatProvider
Inheritance: objectWorkbookFormatProviderBaseBinaryWorkbookFormatProviderBaseJsonFormatProvider
Implements:
Inherited Members
Constructors
JsonFormatProvider()
Initializes a new instance of the JsonFormatProvider class with default JsonExportSettings.
Declaration
public JsonFormatProvider()
Properties
CanExport
Gets a value indicating whether export is supported (always true).
CanImport
Gets a value indicating whether import is supported (always false for this provider).
ExportSettings
Gets or sets the export settings controlling JSON output. If null at export time, defaults are applied.
Declaration
public JsonExportSettings ExportSettings { get; set; }
Property Value
FilesDescription
Gets a human-readable description of the file type handled by this provider.
Declaration
public override string FilesDescription { get; }
Property Value
Overrides
Name
Gets the provider name.
SupportedExtensions
Gets the set of supported file extensions (currently only ".json").
Declaration
public override IEnumerable<string> SupportedExtensions { get; }
Property Value
Overrides
Methods
ExportOverride(Workbook, Stream)
Exports the specified workbook to the output output using None.
Declaration
[Obsolete("This method is obsolete. Please use ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken) instead.")]
protected override void ExportOverride(Workbook workbook, Stream output)
Parameters
workbook
The workbook to export.
output
The destination stream.
Overrides
ExportOverride(Workbook, Stream, CancellationToken)
Performs the export operation writing a JSON representation of workbook into output.
Declaration
protected override void ExportOverride(Workbook workbook, Stream output, CancellationToken cancellationToken)
Parameters
workbook
The workbook to export.
output
The destination stream (must be writable).
cancellationToken
Token used to observe cancellation requests.
Exceptions
Thrown if workbook or output is null.
Overrides
ImportOverride(Stream)
Import is not supported and always throws NotSupportedException.
ImportOverride(Stream, CancellationToken)
Import with cancellation is not supported and always throws NotSupportedException.
Declaration
protected override Workbook ImportOverride(Stream input, CancellationToken cancellationToken)
Parameters
input
The input stream.
cancellationToken
Cancellation token (ignored).
Returns
Never returns; always throws.
Overrides