Closed Kuassari closed 5 years ago
@Kuassari Just to clarify, the spreadsheet is inserted into a web page, or the web page is inserted into a spreadsheet? It sounds like you might be getting a layout.
Also, this link would probably create a problem: link_to " Export".html_safe, server_report_system_reports_path(format: :xlsx)
The link_to helper will create another tag on the right, and you are probably getting another tag as well. This could be the source of your problems.
the layout ruined it so after I wrote layout: false it worked. Now I have other problems but it's not connected to this problem
I tried everything I saw here, guides and stackoverflow and I don't know what to do. Everytime I try to export data it takes the html page text and insert it to xlsx file instead of what I wanted. See this picture:
Gemfile:
Html file:
= link_to "<i class='icon icon-file-down'></i> Export</a></li>".html_safe, server_report_system_reports_path(format: :xlsx)
Controller file:
xlsx.axlsx file: