module Smerp module Exporter module Excel class Worksheet attr_reader :inst attr_accessor :config def initialize(ws, config) @inst = ws @config = config @curRow = 0 @curCol = 0 if @config.start_row != @curRow (0...@config.start_row-1).each do |i| @inst.add_row end end end def start_col=(col) @config.start_col = col end def insert_row(val = [], *args, &block) if @config.start_col != 0 patch = Array.new(@config.start_col).collect { |e| "" } val = patch.concat(val) end @inst.add_row(val, *args) end def method_missing(mtd, *args, &block) @inst.send(mtd, *args, &block) end end end end end