class Oxcelix::RawWorkbook
RawWorkbook
is a Workbook
that contains the raw values of the original Excel cells instead of Cell
objects. The values are taken from the Sheet
arrays by running the #Cell::value method.
Private Instance Methods
buildsheet(sheet, options)
click to toggle source
{include:Workbook}
# File lib/oxcelix/workbook.rb, line 331 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.value end return m end