{"id":18140874,"url":"https://github.com/gui/fast_excel_rails","last_synced_at":"2025-07-12T14:34:50.711Z","repository":{"id":56845627,"uuid":"383615810","full_name":"GUI/fast_excel_rails","owner":"GUI","description":"A Rails template handler for the fast_excel gem.","archived":false,"fork":false,"pushed_at":"2021-07-06T22:53:11.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T05:18:32.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GUI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-06T22:52:25.000Z","updated_at":"2022-11-24T01:56:39.000Z","dependencies_parsed_at":"2022-09-17T21:55:15.525Z","dependency_job_id":null,"html_url":"https://github.com/GUI/fast_excel_rails","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GUI%2Ffast_excel_rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GUI%2Ffast_excel_rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GUI%2Ffast_excel_rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GUI%2Ffast_excel_rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GUI","download_url":"https://codeload.github.com/GUI/fast_excel_rails/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249795270,"owners_count":21326778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-01T16:07:12.615Z","updated_at":"2025-04-19T20:43:37.582Z","avatar_url":"https://github.com/GUI.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FastExcelRails\n\nA Rails template handler for the [fast_excel](https://github.com/Paxa/fast_excel) gem.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"fast_excel_rails\"\n```\n\nAnd then execute:\n\n```\n$ bundle install\n```\n\n## Usage\n\n### Controllers\n\nThe default template file for your controller action can be rendered using `format.xlsx`:\n\n```ruby\nclass ThingsController \u003c ApplicationController\n  def index\n    @things = (1..1000).to_a\n    respond_to do |format|\n      format.xlsx\n    end\n  end\nend\n```\n\nOther options, like filenames or custom template paths, can be set using an explicit render call:\n\n```ruby\nclass ThingsController \u003c ApplicationController\n  def index\n    respond_to do |format|\n      format.xlsx { render :xlsx =\u003e \"my filname.xlsx\", :template =\u003e \"custom_template\"\n    end\n  end\nend\n```\n\n### Templates\n\nTemplates use the `.xlsx.fast_excel` extension and are normal Ruby files that have access to a `workbook` variable that is a [`FastExcel::Workbook`](https://github.com/Paxa/fast_excel) instance.\n\nFor example, `app/views/things/index.xlsx.fast_excel`:\n\n```ruby\nworksheet = workbook.add_worksheet\n\nworksheet.append_row([\"Message\", \"Price\", \"Date\"], workbook.bold_format)\n\n@things.each do |i|\n  worksheet \u003c\u003c [\"Hello\", (rand * i).round(2), Time.now])\nend\n```\n\nSee [fast_excel](https://github.com/Paxa/fast_excel) for further information on usage syntax.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fast_excel_rails.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgui%2Ffast_excel_rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgui%2Ffast_excel_rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgui%2Ffast_excel_rails/lists"}