def parse(options={})
      @sheets.each do |x|
        if !options[:paginate].nil?
          lines = options[:paginate][0]; page = options[:paginate][1]
          sheet = PagSheet.new(lines, page)
        elsif !options[:cellrange].nil?
          range = options[:cellrange]
          sheet = Cellrange.new(range)
        else
          sheet = Xlsheet.new()
        end

        File.open(@destination+"/xl/#{x[:filename]}", 'r') do |f|
          Ox.sax_parse(sheet, f)
        end
        comments = mkcomments(x[:comments])
        sheet.cellarray.each do |sh|
          sh.numformat = @styles.styleary[sh.style.to_i]
          if sh.type=="s"
            sh.value = @sharedstrings[sh.value.to_i]
          end
          if !comments.nil?
            comm=comments.select {|c| c[:ref]==(sh.xlcoords)}
            if comm.size > 0
              sh.comment=comm[0][:comment]
            end
            comments.delete_if{|c| c[:ref]==(sh.xlcoords)}
          end
        end
        x[:cells] = sheet.cellarray
        x[:mergedcells] = sheet.mergedcells
      end
      matrixto options
    end
def parse(options={})
      @sheets.each do |x|
        if !options[:paginate].nil?
          lines = options[:paginate][0]; page = options[:paginate][1]
          sheet = PagSheet.new(lines, page)
        elsif !options[:cellrange].nil?
          range = options[:cellrange]
          sheet = Cellrange.new(range)
        else
          sheet = Xlsheet.new()
        end

        File.open(@destination+"/xl/#{x[:filename]}", 'r') do |f|
          Ox.sax_parse(sheet, f)
        end
        comments = mkcomments(x[:comments])
        sheet.cellarray.each do |sh|
          sh.numformat = @styles.styleary[sh.style.to_i]
          if sh.type=="s"
            sh.value = @sharedstrings[sh.value.to_i]
          end
          if !comments.nil?
            comm=comments.select {|c| c[:ref]==(sh.xlcoords)}
            if comm.size > 0
              sh.comment=comm[0][:comment]
            end
            comments.delete_if{|c| c[:ref]==(sh.xlcoords)}
          end
        end
        x[:cells] = sheet.cellarray
        x[:mergedcells] = sheet.mergedcells
      end
      matrixto options
    end
Parses sheet data by feeding the output of the Xlsheet SAX parser into the arrays representing the sheets.
 @param [Hash] options Options that affect the parser.