class Oxcelix::PagSheet

A class that is inherited from the Xlsheet parser, but only parses a “page” of the given sheet. Its initialize will honor the per_page option (lines per page) and the pageno option (actual page to be parsed) Cells outside the actual page will be omitted from the parsing process. Mergegroups will only be included if the starting cell is within the actual page

Attributes

cell[RW]
cellarray[RW]
mergedcells[RW]
xmlstack[RW]

Public Class Methods

new(per_page, pageno) click to toggle source
Calls superclass method Oxcelix::Xlsheet::new
# File lib/oxcelix/sax/xlsheet.rb, line 93
def initialize(per_page, pageno)
  @PER_PAGE = per_page
  @PAGENO   = pageno
  super()
end

Public Instance Methods

text(str) click to toggle source
# File lib/oxcelix/sax/xlsheet.rb, line 99
def text(str)
  if @xmlstack.last == :c
    if @cell.type != "shared" && @cell.type != "e" && str.numeric? && ((@PER_PAGE * (@PAGENO-1)..(@PER_PAGE*@PAGENO-1)).include?@cell.y)
      @cell.v str
      @cellarray << @cell
    end
    @cell = Cell.new
  end
end