Designing Spreadsheets using Axlsx in Rails

Spreadsheet generation made easy.

Deep In Rails

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

Advertisements

About Gautam Rege

Rubyist, Entrepreneur and co-founder of Josh-Software - one of the leading Ruby development shops in India.
This entry was posted in General. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s