Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
apply_styles method on sheet #9
If you work with vanilla
As far as
We could do it like this:
module AxlsxStyler module Axlsx module Package original_serialize = instance_method(:serialize) define_method :serialize do @workbook.apply_styles original_serialize.bind(self).() end original_to_stream = instance_method(:to_stream) define_method :to_stream do @workbook.apply_styles original_to_stream.bind(self).() end end end end
I read this method of patching from this stackoverflow post http://stackoverflow.com/questions/4470108/when-monkey-patching-a-method-can-you-call-the-overridden-method-from-the-new-i
Thanks for the example. I will look at it some time next week.
In the meantime it would be great to know what is the root cause of your problems.