Writing data to an excel file from 2 tables

I tried to_xls to export data, but is there a good way to export data to an excel file from two different tables in rails. For example, I have a table of user tables and user data, now I want to have records of both tables in my excel file.

+3
source share
1 answer

Have you tried it

 `send_data book, :filename => "sample.xls", :type => "application/vnd.ms-excel"`

`

+1
source

All Articles