Class Spreadsheet::Workbook
In: lib/spreadsheet/workbook.rb
Parent: Object

The Workbook class represents a Spreadsheet-Document and is the entry point for all Spreadsheet manipulation.

Interesting Attributes:

default_format:The default format used for all cells in this Workbook. that have no format set explicitly or in Row#default_format or Worksheet#default_format.

Methods

Included Modules

Spreadsheet::Encodings

Attributes

active_worksheet  [RW] 
default_format  [RW] 
encoding  [RW] 
fonts  [R] 
formats  [R] 
io  [R] 
version  [RW] 
worksheets  [R] 

Public Class methods

Public Instance methods

Add a Font to the Workbook. Used by the parser. You should not need to use this Method.

Add a Format to the Workbook. If you use Row#set_format, you should not need to use this Method.

Create a new Worksheet in this Workbook. Used without options this creates a Worksheet with the name ‘WorksheetN’ where the new Worksheet is the Nth Worksheet in this Workbook.

Use the option :name => ‘My pretty Name‘ to override this behavior.

The Font at idx

The Format at idx, or - if idx is a String - the Format with name == idx

The Worksheet at idx, or - if idx is a String - the Worksheet with name == idx

Write this Workbook to a File, IO Stream or Writer Object. The latter will make more sense once there are more than just an Excel-Writer available.

Returns a new instance of the default Writer class for this Workbook (can only be an Excel::Writer::Workbook at this time)

[Validate]