{"action":"created","issue":{"url":"https://api.github.com/repos/bogdan/datagrid/issues/178","repository_url":"https://api.github.com/repos/bogdan/datagrid","labels_url":"https://api.github.com/repos/bogdan/datagrid/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/bogdan/datagrid/issues/178/comments","events_url":"https://api.github.com/repos/bogdan/datagrid/issues/178/events","html_url":"https://github.com/bogdan/datagrid/issues/178","id":150192775,"number":178,"title":"export to XLS","user":{"login":"dantete","id":4230552,"avatar_url":"https://avatars.githubusercontent.com/u/4230552?v=3","gravatar_id":"","url":"https://api.github.com/users/dantete","html_url":"https://github.com/dantete","followers_url":"https://api.github.com/users/dantete/followers","following_url":"https://api.github.com/users/dantete/following{/other_user}","gists_url":"https://api.github.com/users/dantete/gists{/gist_id}","starred_url":"https://api.github.com/users/dantete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantete/subscriptions","organizations_url":"https://api.github.com/users/dantete/orgs","repos_url":"https://api.github.com/users/dantete/repos","events_url":"https://api.github.com/users/dantete/events{/privacy}","received_events_url":"https://api.github.com/users/dantete/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-21T21:13:26Z","updated_at":"2016-04-21T21:21:07Z","closed_at":null,"body":"Hi. \r\n\r\nhow do you export to XLS? \r\nI searched in the wiki and closed issues but i found nothing. \r\n\r\ni already tested with Nokogiri getting the html table. \r\nand i tested with: send_data @grid.to_xls xD \r\nbut nothing... \r\n\r\nany hint or solution?? thanks! \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bogdan/datagrid/issues/comments/213118678","html_url":"https://github.com/bogdan/datagrid/issues/178#issuecomment-213118678","issue_url":"https://api.github.com/repos/bogdan/datagrid/issues/178","id":213118678,"user":{"login":"bogdan","id":122436,"avatar_url":"https://avatars.githubusercontent.com/u/122436?v=3","gravatar_id":"","url":"https://api.github.com/users/bogdan","html_url":"https://github.com/bogdan","followers_url":"https://api.github.com/users/bogdan/followers","following_url":"https://api.github.com/users/bogdan/following{/other_user}","gists_url":"https://api.github.com/users/bogdan/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdan/subscriptions","organizations_url":"https://api.github.com/users/bogdan/orgs","repos_url":"https://api.github.com/users/bogdan/repos","events_url":"https://api.github.com/users/bogdan/events{/privacy}","received_events_url":"https://api.github.com/users/bogdan/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T21:21:07Z","updated_at":"2016-04-21T21:21:07Z","body":"You can export to CSV and open the file with XLS. This is what most people do. I can put up and XLS example for you if you want, but it should be super simple.\r\n\r\nUse the `to_csv` function from source code as an example and just replace CSV library calls to XLS library calls:\r\n\r\n``` ruby\r\n      def to_csv(*column_names)\r\n        options = column_names.extract_options!\r\n        csv_class.generate(\r\n          {:headers => self.header(*column_names), :write_headers => true}.merge!(options)\r\n        ) do |csv|\r\n          each_with_batches do |asset|\r\n            csv << row_for(asset, *column_names)\r\n          end\r\n        end\r\n      end\r\n```"}}