Closed wooly closed 11 years ago
Hi! to_spreadsheet at the moment will only look for .html.*
views (as I can see from your use case I'll need to change this in the future).
Please try renaming show.xlsx.erb
to show.html.erb
and let me know if it works
I will update the docs and improve the template handling some time later this week
Ahh alright, I'll give that a try! thanks!
Edit: That's working great. I'll probably just create a new member method to put the stuff I currently have in show.html.erb as it shouldn't really be there. Thanks though!
to_spreadsheet
will only use the tables from your view (ignoring the rest), so you should be able to reuse the same view for both html
and xlsx
Custom formatting can be done by using format_xls
(as in readme)
Will keep this open, because to_spreadsheet
should look for .xlsx.*
views first and only then fallback to .html.*
ahh grand, that's good to know. Thanks!
Hey,
In my controller, I have the following:
and my show.xlsx.erb looks like this:
However, this results in an empty spreadsheet document being created with two empty sheets in it. Any idea what I'm doing wrong?