activeadmin-axlsx
activeadmin-axlsx copied to clipboard
get data for pivot table from another sheet in after_filter hook
my code:
after_filter { |sheet|
new_sheet = sheet.workbook.add_worksheet(:name => 'Pivot Table')
new_sheet.add_pivot_table "A1:B2", "'Sheet1'!A1:M15" do |pivot_table|
pivot_table.rows = ['Month', 'Year']
pivot_table.columns = ['Type']
pivot_table.data = ['Sales']
end
}
but i receive
undefined method `row' for nil:NilClass
do i miss something or is this a bug?