Method: LibExcel::Worksheet#initialize
- Defined in:
- lib/libexcel/worksheet.rb
#initialize(name) ⇒ Worksheet
Creates the Worksheet object. name is the name of the Excel Document Tab. name gets truncated to 31 chars.
18 19 20 21 22 23 24 25 26 |
# File 'lib/libexcel/worksheet.rb', line 18 def initialize(name) super('Worksheet') # Excel complains if the name is more than 31 chars. self['ss:Name'] = name[0..30] self.append table @f_column = XML::Node.new('Column') @f_column['ss:Width'] = DEFAULT_COLUMN_WIDTH @table << @f_column end |