Closed eduscrakozabrus closed 4 years ago
Rails in api mode does not include the template loading mechanism. It does not include ActionView. This is probably your issue. See this issue for suggestions: https://github.com/caxlsx/caxlsx_rails/issues/107
@eduscrakozabrus how did you fix this? can you share important files to solve this issue? I'm trying but I can not get success.
@joelGarcia93 Did you see Issue #107 listed above?
my routs:
get 'conversations/export-excel', to: 'conversations#export_excel', defaults: { format: "xlsx" }
my controller:
def export_excel @сonversations = Conversation.all respond_to do |format| format.xlsx end end
my example axlsx: `p = Axlsx::Package.new wb = p.workbookwb.add_worksheet(:name => "Basic Worksheet") do |sheet| sheet.add_row ["First Column", "Second", "Third"] sheet.add_row [1, 2, 3] sheet.add_row [' preserving whitespace'] end`
but have in file one value: [object Object]