lib/excelfile/worksheet.rb in rubyfromexcel-0.0.22 vs lib/excelfile/worksheet.rb in rubyfromexcel-0.0.23

- old
+ new

@@ -1,5 +1,7 @@ +# encoding: utf-8 + module RubyFromExcel class Worksheet def self.from_file(filename,workbook = nil) xml = File.open(filename) { |f| Nokogiri::XML(f).root } @@ -84,10 +86,10 @@ raise end end if workbook.indirects_used named_references.each do |name,reference| - r.put_simple_method name, reference + r.put_simple_method name.downcase.gsub(/[^\p{word}]/,'_'), reference end end end r.to_s end \ No newline at end of file