lib/write_xlsx/package/table.rb in write_xlsx-1.08.2 vs lib/write_xlsx/package/table.rb in write_xlsx-1.09.0
- old
+ new
@@ -115,12 +115,12 @@
handle_the_function_for_the_table_row(
@row2, col_data, col_num, user_data
)
elsif user_data[:total_string]
total_label_only(
- @row2, col_num, col_data, user_data[:total_string], user_data[:format]
- )
+ @row2, col_num, col_data, user_data[:total_string], user_data[:format]
+ )
end
# Get the dxf format index.
if user_data[:format]
col_data.format = user_data[:format].get_dxf_index
@@ -179,11 +179,11 @@
# Swap last row/col for first row/col as necessary.
row1, row2 = row2, row1 if row1 > row2
col1, col2 = col2, col1 if col1 > col2
- # The final hash contains the validation parameters.
+ # The final hash contains the validation parameters.
param ||= {}
# Turn on Excel's defaults.
param[:banded_rows] ||= 1
param[:header_row] ||= 1
@@ -206,21 +206,21 @@
end
# List of valid input parameters.
def valid_table_parameter
[
- :autofilter,
- :banded_columns,
- :banded_rows,
- :columns,
- :data,
- :first_column,
- :header_row,
- :last_column,
- :name,
- :style,
- :total_row
+ :autofilter,
+ :banded_columns,
+ :banded_rows,
+ :columns,
+ :data,
+ :first_column,
+ :header_row,
+ :last_column,
+ :name,
+ :style,
+ :total_row
]
end
def handle_the_column_formula(col_data, col_num, formula, format)
return unless formula
@@ -329,16 +329,16 @@
def write_table_attributes
schema = 'http://schemas.openxmlformats.org/'
xmlns = "#{schema}spreadsheetml/2006/main"
attributes = [
- ['xmlns', xmlns],
- ['id', id],
- ['name', @name],
- ['displayName', @name],
- ['ref', @range]
- ]
+ ['xmlns', xmlns],
+ ['id', id],
+ ['name', @name],
+ ['displayName', @name],
+ ['ref', @range]
+ ]
unless ptrue?(@header_row_count)
attributes << ['headerRowCount', 0]
end
@@ -376,12 +376,12 @@
#
# Write the <tableColumn> element.
#
def write_table_column(col_data)
attributes = [
- ['id', col_data.id],
- ['name', col_data.name]
- ]
+ ['id', col_data.id],
+ ['name', col_data.name]
+ ]
if ptrue?(col_data.total_string)
attributes << [:totalsRowLabel, col_data.total_string]
elsif ptrue?(col_data.total_function)
attributes << [:totalsRowFunction, col_data.total_function]