Export to Excel / PDF with Ruby on Rails 3


has someone successfully exported dhtmlx grid using Ruby on Rails 3 ?
I have followed the great tutorial here: [url]Editable Datagrid for Ruby on Rails Built with dhtmlxGrid - DHTMLX Blog and successfully form the grid
Btw, this dhtmlxgrid filtering functionality is really cool

what i need now is to generate it to excel
Say, after user filter the data s/he wants, click “Export to Excel” button, and .xls is generated exactly like what is in the grid (after filtering)

Could someone help providing sample script?

Thanks a bunch,

PS: I notice this great link : [url]Export dhtmlxGrid to Excel - DHTMLX Blog
but it only has for PHP / Java / ASP.NET. RoR ???

you may use online service tool for export instead of using export script at local server.
So you may include file codebase/ext/dhtmlxgrid_export.js to grid page and then add the follow code:

<input type="button" value="Excel" onclick='grid.toExcel("http://dhtmlxgrid.appspot.com/export/excel");' />

Here is a little more anformation about online export service: