activeadmin-axlsx icon indicating copy to clipboard operation
activeadmin-axlsx copied to clipboard

get data for pivot table from another sheet in after_filter hook

Open okliv opened this issue 10 years ago • 1 comments

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?

okliv avatar Nov 29 '13 03:11 okliv