summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorsato-s <[email protected]>2016-10-09 21:47:10 +0900
committersato-s <[email protected]>2016-10-09 22:14:40 +0900
commitfe80334f213e3dc149f560a50d90d09054f519fe (patch)
treeccf8d929d473dc651e84fdb5c48bca7559caed77 /lib
parentd136835f3a3a54831ad2c7c793a51d3a57273892 (diff)
downloadcaxlsx-fe80334f213e3dc149f560a50d90d09054f519fe.tar.gz
caxlsx-fe80334f213e3dc149f560a50d90d09054f519fe.zip
Fix #472: worksheet name with underscore
Previously, worksheet name was defined as a serializable_attributes that Axlsx automatically camelize by Axlsx.camel . This cause an unexpected worksheet name convertion. For instance, - "Pie_chart" is converted into "Piechart" - "_example" is converted into "Example" This patch disables an unexpected worksheet name convertion.
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb
index 1d35b99d..26be8bd8 100644
--- a/lib/axlsx/workbook/worksheet/worksheet.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet.rb
@@ -27,7 +27,7 @@ module Axlsx
yield self if block_given?
end
- serializable_attributes :sheet_id, :name, :state
+ serializable_attributes :sheet_id, :state
# Initalizes page margin, setup and print options
# @param [Hash] options Options passed in from the initializer
@@ -597,6 +597,7 @@ module Axlsx
add_autofilter_defined_name_to_workbook
str << '<sheet '
serialized_attributes str
+ str << ('name="' << name << '" ')
str << ('r:id="' << rId << '"></sheet>')
end