Spreadsheet generation made easy.
As a Rails developer we often need to create custom reports in some format – pdf, ppt, xlsx etc. Here I will explain how to generate spreadsheets in Rails with custom design and style. To generate spreadsheets we will be using a tool. Tool…? No! In Rails there are no ‘tools’; there are ‘gems’ and the one we shall use is Axlsx.
What is Axlsx? Axlsx is a Ruby gem which generates an open office spreadsheets with custom design and styles, custom and automated width and height of columns and rows, images (with links), merged cells, formulas, data types and formats, validations, hyperlinks and charts (Pie, Bar, line charts 2D and 3D). So lets start generating excel worksheets with Axlsx.
First thing first create rails application and add
to your Gemfile. Then install the bundle
Lets create a Student model to represent data in a worksheet with fields like…
View original post 535 more words