Method: Axlsx::Workbook#initialize

Defined in:
lib/axlsx/workbook/workbook.rb

#initialize(options = {}) {|_self| ... } ⇒ Workbook

Creates a new Workbook The recomended way to work with workbooks is via Package#workbook

Options Hash (options):

  • date1904. (Boolean)

    If this is not specified, date1904 is set to false. Office 2011 for Mac defaults to false.

Yields:

  • (_self)

Yield Parameters:



164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/axlsx/workbook/workbook.rb', line 164

def initialize(options={})
  @styles = Styles.new
  @worksheets = SimpleTypedList.new Worksheet
  @drawings = SimpleTypedList.new Drawing
  @charts = SimpleTypedList.new Chart
  @images = SimpleTypedList.new Pic
  # Are these even used????? Check package serialization parts
  @tables = SimpleTypedList.new Table
  @comments = SimpleTypedList.new Comments


  @use_autowidth = true

  self.date1904= !options[:date1904].nil? && options[:date1904]
  yield self if block_given?
end