Method Layout
- Namespace
- DocWright.Spreadsheet.Rendering
- Assembly
- DocWright.Spreadsheet.Rendering.dll
Layout(XlsxDocumentSheet, FontEngine, SpreadsheetLayoutOptions?)
Lays one sheet out.
public static LayoutDocument Layout(XlsxDocumentSheet sheet, FontEngine fonts, SpreadsheetLayoutOptions? options = null)
Parameters
sheetXlsxDocumentSheetThe sheet. A sheet that is not a worksheet (a chart sheet) gives one empty page.
fontsFontEngineThe font engine the cells' fonts are resolved and measured with.
optionsSpreadsheetLayoutOptionsWhat is laid out and how, or null for the sheet's own page setup.
Returns
- LayoutDocument
The pages, numbered from 1. Never fewer than one page.
Exceptions
- ArgumentNullException
sheetorfontsis null.- InvalidDocumentException
A part of the workbook the layout reads is malformed.
- ResourceLimitExceededException
The sheet is more pages than Limits allows.
Layout(XlsxDocument, FontEngine, SpreadsheetLayoutOptions?)
Lays the sheets of a workbook out, one after another.
public static LayoutDocument Layout(XlsxDocument document, FontEngine fonts, SpreadsheetLayoutOptions? options = null)
Parameters
documentXlsxDocumentThe workbook.
fontsFontEngineThe font engine the cells' fonts are resolved and measured with.
optionsSpreadsheetLayoutOptionsWhat is laid out and how, or null for every visible worksheet with its own page setup. Sheets names the sheets to lay out, hidden ones included.
Returns
- LayoutDocument
The pages of the sheets in order, numbered from 1 through the whole workbook. Never fewer than one page.
Exceptions
- ArgumentNullException
documentorfontsis null.- InvalidDocumentException
A part of the workbook the layout reads is malformed.
- ResourceLimitExceededException
The sheets are more pages than Limits allows.