Method ToJson
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
ToJson(string, Stream, XlsxJsonOptions?)
Writes one sheet as JSON. See ToJson(Stream, XlsxJsonOptions?).
public void ToJson(string sheetName, Stream stream, XlsxJsonOptions? options = null)
Parameters
sheetNamestringThe sheet's name, compared without regard to case.
streamStreamWhere the bytes go. It is not closed.
optionsXlsxJsonOptionsHow to write, or null for the defaults.
Exceptions
- ArgumentNullException
sheetNameorstreamis null.- ArgumentException
The workbook has no sheet of that name.
- InvalidOperationException
The sheet is not a worksheet.
- ResourceLimitExceededException
The range covers more cells than MaxCells.
- InvalidDocumentException
The sheet's part is malformed.