def spreadsheet(spreadsheet, sheets, options={}) @rspreadsheet = spreadsheet coordinates = true # default o="" if options[:coordinates] != nil o << ":coordinates uebergeben: #{options[:coordinates]}" coordinates = options[:coordinates] end if options[:bgcolor] bgcolor = options[:bgcolor] else bgcolor = false end sheets.each { |sheet| @rspreadsheet.default_sheet = sheet linenumber = @rspreadsheet.first_row(sheet) if options[:first_row] linenumber += (options[:first_row]-1) end o << '
" @rspreadsheet.first_column(sheet).upto(@rspreadsheet.last_column(sheet)) {|c| if c < first_column or c > last_column next end o << " | " o << " #{GenericSpreadsheet.number_to_letter(c)}" o << " | " } o << "|
#{linenumber.to_s} | " end linenumber += 1 @rspreadsheet.first_column(sheet).upto(@rspreadsheet.last_column(sheet)) do |x| if x < first_column or x > last_column next end if bgcolor o << "" else o << ' | ' end if @rspreadsheet.cell(y,x).to_s.empty? o << " " else o << "#{@rspreadsheet.cell(y,x)}" end o << " | " end o << "