Let's say I have an instance variable coming in from my controller called @company
Then In my .xlsx.axlsx
wb = xlsx_package.workbook
wb.insert_worksheet(1, name: 'Sheet 2') do |sheet|
sheet.add_row([@company.name]) # <- Works fine
end
wb.insert_worksheet(0, name: 'Sheet 1') do |sheet|
sheet.add_row([@company.name]) # <- Throws exception, @company is nil
end
add_worksheet doesn't have the same issue. Am I missing something? Also not sure if I should post that here or in the axlsx repo
Let's say I have an instance variable coming in from my controller called
@company
Then In my .xlsx.axlsx
add_worksheet doesn't have the same issue. Am I missing something? Also not sure if I should post that here or in the axlsx repo