Class SpreadsheetConverter
- Namespace
- DocWright.Spreadsheet.Rendering
- Assembly
- DocWright.Spreadsheet.Rendering.dll
Saves a workbook as PDF, as images and as HTML: SpreadsheetLayout and the renderers behind one object that holds the fonts.
public sealed class SpreadsheetConverter
- Inheritance
-
SpreadsheetConverter
- Inherited Members
Remarks
A workbook is not a document format: it is not registered with a document converter, and a document converter is never asked about it.
Nothing is calculated. A formula shows the result the file stores; when the workbook's cells were changed since, a diagnostic says the picture shows values from before the change.
Building a font engine reads the machine's fonts: make one converter and use it for every workbook. It is safe to use from several threads.
Constructors
- SpreadsheetConverter()
Initializes a converter with a font engine of its own over the machine's fonts.
- SpreadsheetConverter(FontEngine)
Initializes a converter over a font engine.
Properties
- Fonts
Gets the font engine.
Methods
- RenderChart(XlsxChart, SpreadsheetImageOptions?)
Draws one chart on its own, as an image as large as the chart is on its sheet: the chart part drawn by the engine a document's charts are drawn by, with the workbook's theme.
- RenderRange(XlsxDocumentSheet, XlsxCellRange, int)
Draws one range of a sheet as a PNG exactly as large as its cells, with the grid the sheet shows on screen.
- ToHtml(XlsxDocument, TextWriter, SpreadsheetHtmlOptions?)
Writes a workbook as one self-contained HTML page: a table for each sheet, with the text Excel shows in each cell, its alignment, font, fill and borders as CSS, merged ranges as spans, and hidden rows and columns left out.
- ToImages(XlsxDocument, SpreadsheetImageOptions?)
Draws a workbook's pages as images: the pages ToPdf(XlsxDocument, Stream, SpreadsheetPdfOptions?) writes, or with SinglePage in Layout one image for each sheet, as large as its cells.
- ToPdf(XlsxDocument, Stream, SpreadsheetPdfOptions?)
Writes a workbook as PDF, page for page what Excel's own export writes: every visible worksheet in order, each by its print area and page setup.