Wednesday, June 13, 2012

Ruby Java Bridge

A week ago while working on a Ruby on Rails project, I had to generate a highly complex excel file for certain Reporting requirements of the client. Previously I had used the Spreadsheet gem for generating the xls templates but it was clear spreadsheet was not going to be enough, since it works well on predefined templates only. We also looked at some other gems like WriteExcel but could not find a gem which was robust enough for our purpose.

When all hope was lost, we had to revert to Java, and fortunately Java had some jars which we could use for our requirement. We wrote the code in Java and using the Ruby Java Bridge gem, we could successfully generate the required excel report by reusing the Java code.

Link [Tutorial for RJB gem] http://www.ibm.com/developerworks/java/tutorials/j-rjb/index.html

No comments:

Powered By Blogger
Custom Search