def buildsheet(sheet, options)
      ydiff, xdiff = 0,0
      if !options[:paginate].nil?
        ydiff = options[:paginate][0] * (options[:paginate][1]-1)
      elsif !options[:cellrange].nil?
        xdiff = x(options[:cellrange].begin)
        ydiff = y(options[:cellrange].begin)
      end
      m=Sheet.build(sheet[:cells].last.y+1-ydiff, sheet[:cells].last.x+1-xdiff) {nil}
      sheet[:cells].each do |c|
        m[c.y-ydiff, c.x-xdiff] = c.to_fmt
      end
      return m
    end
def buildsheet(sheet, options)
      ydiff, xdiff = 0,0
      if !options[:paginate].nil?
        ydiff = options[:paginate][0] * (options[:paginate][1]-1)
      elsif !options[:cellrange].nil?
        xdiff = x(options[:cellrange].begin)
        ydiff = y(options[:cellrange].begin)
      end
      m=Sheet.build(sheet[:cells].last.y+1-ydiff, sheet[:cells].last.x+1-xdiff) {nil}
      sheet[:cells].each do |c|
        m[c.y-ydiff, c.x-xdiff] = c.to_fmt
      end
      return m
    end
{include:Workbook}