I've been trying to generate an XLSX file in my app. I'm using the gem 'acts_as_xlsx'.
The problem is that the document is generated in the background, and I don't want to render a view. It's a script that should return the XLSX file.
I'm trying to do something like:
file = File.open("report.xlsx", relation.to_xlsx, type: "application/vnd.openxmlformates-officedocument.spreadsheetml.sheet")
This returns an error as the second argument of the File.open must be a string.
Thanks in advance!