lib/axlsx.rb in axlsx-1.1.4 vs lib/axlsx.rb in axlsx-1.1.5
- old
+ new
@@ -2,18 +2,17 @@
require 'axlsx/version.rb'
require 'axlsx/util/simple_typed_list.rb'
require 'axlsx/util/constants.rb'
require 'axlsx/util/validators.rb'
-require 'axlsx/util/storage.rb'
#not even close to being ready but it does not break anything so it stays for now.
# needs a full re-write to use agile-encryption properly
-require 'axlsx/util/cbf.rb'
-require 'axlsx/util/ms_off_crypto.rb'
+# require 'axlsx/util/storage.rb'
+# require 'axlsx/util/cbf.rb'
+# require 'axlsx/util/ms_off_crypto.rb'
-
# to be included with parsable intitites.
#require 'axlsx/util/parser.rb'
require 'axlsx/stylesheet/styles.rb'
@@ -52,9 +51,10 @@
"#{items.first.r_abs}"
ref += ":#{items.last.r_abs}" if items.size > 1
ref
end
+ # returns the x, y position of a cell
def self.name_to_indices(name)
raise ArgumentError, 'invalid cell name' unless name.size > 1
v = name[/[A-Z]+/].reverse.chars.reduce({:base=>1, :i=>0}) do |val, c|
val[:i] += ((c.bytes.first - 64) * val[:base]); val[:base] *= 26; val
end