Sha256: c0b7dbce071685e66231667876198b49d77b818435fd87c25586bb6277ab43b8
Contents?: true
Size: 695 Bytes
Versions: 1
Compression:
Stored size: 695 Bytes
Contents
#!/usr/bin/env ruby -w -s # -*- coding: utf-8 -*- $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" require 'axlsx' Axlsx::Worksheet.class_eval do def add_row_with_position(values = [], options = {}) if options.try(:[], :start_at).present? val = [] options[:start_at].times { val.push nil} options.delete(:start_at) values = val + values end add_row_without_position(values, options) end alias_method_chain :add_row, :add_row_without_position end p = Axlsx::Package.new wb = p.workbook wb.add_worksheet do |ws| ws.add_row_with_position([1,2,3,4,5], :start_at => 5) end p.validate.each { |e| puts e.message } p.serialize("no-use_autowidth.xlsx")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axlsx-1.1.4 | examples/stack.rb~ |