Table of Contents

Method ToHtml

Namespace
DocWright.Spreadsheet.Rendering
Assembly
DocWright.Spreadsheet.Rendering.dll

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.

public void ToHtml(XlsxDocument document, TextWriter writer, SpreadsheetHtmlOptions? options = null)

Parameters

document XlsxDocument

The workbook.

writer TextWriter

The writer the page is written to.

options SpreadsheetHtmlOptions

Sheets, tabs or stacked, classes or inline styles; null for the defaults.

Remarks

Every character of a cell is escaped and the page holds no script. The markup is well-formed XML as well as HTML. Pictures, charts and shapes are not written.

Exceptions

ArgumentNullException

document or writer is null.

InvalidDocumentException

A part of the workbook that is read is malformed.

ResourceLimitExceededException

The workbook is more cells than MaxCells.