Created
April 26, 2012 11:56
-
-
Save gregory/2499101 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, :position | |
end |
randym
commented
Apr 28, 2012
greets mate- obviously you don't need the load path bit there - but I think this is what your looking todo.
Ill add an :offset option to add row that provides this functionality. definitely beats [nil, nil, nil, nil, 'real data'] stuff
yes it's sexier :D
I ll try this on monday when i m back at work and i ll let you know if ever i still get that stack too deep error message.
Anyway thanks dude! I ve been hacking into poi with monkey patching to get the kind of stuffs you bring trough your gem .. thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment