[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.WorkbookOptions

WorkbookOptions Class

Represents options used when creating a Workbook.

Use this class to configure workbook-level behaviors at construction time, such as whether column widths are measured in pixels instead of character counts. Enabling pixel-based column width can make API behaviors such as auto-fit column, and rendering results such as PDF and image output, closer to SpreadJS.

Inheritance
WorkbookOptions
Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public class WorkbookOptions
Public Class WorkbookOptions
Examples
WorkbookOptions options = new WorkbookOptions();
options.PixelBasedColumnWidth = true;
Workbook workbook = new Workbook(options);
IWorksheet worksheet = workbook.Worksheets[0];
worksheet.Range["A:A"].ColumnWidthInPixel = 96;
double widthInPixels = worksheet.Range["A:A"].ColumnWidthInPixel;

Constructors

Name Description
WorkbookOptions()

Properties

Name Description
PixelBasedColumnWidth

Gets or sets whether the workbook uses pixel-based column width.

By default, a workbook uses character count based column width. Set this option to true to use pixels as the column width unit so that API behaviors such as auto-fit columns and rendering results such as PDF and image output are closer to SpreadJS.