diff --git a/lib/ods.rb b/lib/ods.rb index 40f7738..97e4a2d 100644 --- a/lib/ods.rb +++ b/lib/ods.rb @@ -152,8 +152,12 @@ def cols @cols = [] no = 'A' xpath('table:table-cell').each{|cell| - @cols << Cell.new(cell, no) - no.succ! + repeated = cell.attributes['number-columns-repeated'] + count = (repeated && repeated.value.to_i) || 1 + 1.upto(count) do + @cols << Cell.new(cell, no) + no.succ! + end } @cols end