diff options
| -rw-r--r-- | lib/axlsx/workbook/workbook.rb | 20 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/row.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 2 |
3 files changed, 12 insertions, 14 deletions
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index 134a3e6b..e1c7fb05 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -41,7 +41,6 @@ module Axlsx require 'axlsx/workbook/worksheet/col_breaks' require 'axlsx/workbook/workbook_view' require 'axlsx/workbook/workbook_views' - require 'axlsx/workbook/worksheet/worksheet.rb' require 'axlsx/workbook/shared_strings_table.rb' require 'axlsx/workbook/defined_name.rb' @@ -113,21 +112,21 @@ module Axlsx # @return [SimpleTypedList] attr_reader :worksheets - # A colllection of charts associated with this workbook + # A collection of charts associated with this workbook # @note The recommended way to manage charts is Worksheet#add_chart # @see Worksheet#add_chart # @see Chart # @return [SimpleTypedList] attr_reader :charts - # A colllection of images associated with this workbook + # A collection of images associated with this workbook # @note The recommended way to manage images is Worksheet#add_image # @see Worksheet#add_image # @see Pic # @return [SimpleTypedList] attr_reader :images - # A colllection of drawings associated with this workbook + # A collection of drawings associated with this workbook # @note The recommended way to manage drawings is Worksheet#add_chart # @see Worksheet#add_chart # @see Drawing @@ -136,14 +135,14 @@ module Axlsx # pretty sure this two are always empty and can be removed. - # A colllection of tables associated with this workbook + # A collection of tables associated with this workbook # @note The recommended way to manage drawings is Worksheet#add_table # @see Worksheet#add_table # @see Table # @return [SimpleTypedList] attr_reader :tables - # A colllection of pivot tables associated with this workbook + # A collection of pivot tables associated with this workbook # @note The recommended way to manage drawings is Worksheet#add_table # @see Worksheet#add_table # @see Table @@ -223,9 +222,9 @@ module Axlsx @worksheets[index] if index end - # Creates a new Workbook - # The recomended way to work with workbooks is via Package#workbook - # @option options [Boolean] date1904. If this is not specified, date1904 is set to false. Office 2011 for Mac defaults to false. + # Creates a new Workbook. + # The recommended way to work with workbooks is via Package#workbook. + # @option options [Boolean] date1904 If this is not specified, date1904 is set to false. Office 2011 for Mac defaults to false. def initialize(options = {}) @styles = Styles.new @worksheets = SimpleTypedList.new Worksheet @@ -236,7 +235,6 @@ module Axlsx @tables = SimpleTypedList.new Table @pivot_tables = SimpleTypedList.new PivotTable @comments = SimpleTypedList.new Comments - @use_autowidth = true @bold_font_multiplier = BOLD_FONT_MULTIPLIER @font_scale_divisor = FONT_SCALE_DIVISOR @@ -372,7 +370,7 @@ module Axlsx # @param [Symbol] space must be one of :preserve or :default def xml_space=(space) Axlsx::RestrictionValidator.validate(:xml_space, [:preserve, :default], space) - @xml_space = space; + @xml_space = space end # returns a range of cells in a worksheet diff --git a/lib/axlsx/workbook/worksheet/row.rb b/lib/axlsx/workbook/worksheet/row.rb index 453e1e66..97a7adab 100644 --- a/lib/axlsx/workbook/worksheet/row.rb +++ b/lib/axlsx/workbook/worksheet/row.rb @@ -103,14 +103,14 @@ module Axlsx c end - # sets the color for every cell in this row + # Sets the color for every cell in this row. def color=(color) each_with_index do |cell, index| cell.color = color.is_a?(Array) ? color[index] : color end end - # sets the style for every cell in this row + # Sets the style for every cell in this row. def style=(style) each_with_index do |cell, index| cell.style = style.is_a?(Array) ? style[index] : style diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index d8451e9f..3333c3f4 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -13,7 +13,7 @@ module Axlsx # @option options [Hash] page_margins A hash containing page margins for this worksheet. @see PageMargins # @option options [Hash] print_options A hash containing print options for this worksheet. @see PrintOptions # @option options [Hash] header_footer A hash containing header/footer options for this worksheet. @see HeaderFooter - # @option options [Boolean] show_gridlines indicates if gridlines should be shown for this sheet. + # @option options [Boolean] show_gridlines Whether gridlines should be shown for this sheet. def initialize(wb, options = {}) self.workbook = wb @sheet_protection = nil |
