summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-02-04 15:09:06 +0900
committerRandy Morgan <[email protected]>2013-02-04 15:09:06 +0900
commit7ca62670dbf5640289509c8fd1b9fa7f94e6ef7b (patch)
tree829bd945f15793d3fefb2ba3cd5a194034bace81 /lib/axlsx.rb
parentc99b7b2a138c9c7dd0b42662662f278b01ec7e75 (diff)
downloadcaxlsx-7ca62670dbf5640289509c8fd1b9fa7f94e6ef7b.tar.gz
caxlsx-7ca62670dbf5640289509c8fd1b9fa7f94e6ef7b.zip
Added docs for Axlsx#range_to_a
Diffstat (limited to 'lib/axlsx.rb')
-rw-r--r--lib/axlsx.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb
index ed7a141f..8cecf47a 100644
--- a/lib/axlsx.rb
+++ b/lib/axlsx.rb
@@ -104,6 +104,9 @@ module Axlsx
Axlsx::col_ref(c_index).to_s << (r_index+1).to_s
end
+ # Creates an array of individual cell references based on an excel reference range.
+ # @param [String] range A cell range, for example A1:D5
+ # @return [Array]
def self.range_to_a(range)
range.match(/^(\w+?\d+)\:(\w+?\d+)$/)
start_col, start_row = name_to_indices($1)
@@ -115,7 +118,6 @@ module Axlsx
end
end
-
# performs the increadible feat of changing snake_case to CamelCase
# @param [String] s The snake case string to camelize
# @return [String]