Open dmolesUC opened 1 year ago
Workaround:
module RubyXL
class Cell
def initialize(params = nil)
super
@worksheet ||= params[:worksheet] if params.respond_to?(:[])
end
end
end
Updated to add:
If you have multiple rows, LegacyCell#validate_worksheet
will still fail even with the above, due to row
not getting set, either. Updated workaround:
module RubyXL
class Cell
def initialize(params = nil)
super
if params.respond_to?(:[])
@worksheet ||= params[:worksheet]
self.row ||= params[:row] # note: not an instance variable
end
end
end
end
From the
RubyXL::WorksheetConvenienceMethods#insert_column
source code, it looks like it should:but AFAICT that
worksheet
param never gets used.Steps to reproduce
change_contents
on the cellExpected
Actual
RuntimeError: Cell #<RubyXL::Cell:0x000000010561b808> is not in worksheet
Minimal example
Raises: