creating xls files with images in ruby (UNIX) - ruby-on-rails

I am trying to create a xls file which includes charts with Ruby. We run ruby on rails in Unix environment(Debian). We currently use Spreadsheet gem. But this gem doesn't seem to have chart capability. Looks like Win32ole gem is for Windows only. Axlsx is more what I need but it works with xlsx files. Anyone know a better way of doing this? Thanks!

The writeexcel gem (github) supports xls and charts.

Related

Is there an upgrade gem to prawn to covert odf (.odt)?

I've been using the awesome prawn gem in my last few project, but this time I have to covert a odt file (in odf format) to PDF.
I know that there are many gems that can do this, for example docsplit and others, but since I am already using prawn to generate other PDFs in the same app I would really like to know if I could get a way without adding yet another pdf creator type gem...
Does anyone know any resources that could help? Or at least a (really) simple gem that coverts odt to PDF (without possibly having to install anything)?
Thanks in advance...
No, Prawn can't do that. Prawn is just a library for programmatically generating PDF documents.
Best way would be using LibreOffice in a head-less fashion to convert ODF files into PDF.

How to make .cab in ruby with ruby-libmspack gem

I am working on POC to create .cab file (MS compress format) in ruby on rails application. I found this ruby-libmspack that provide bindings to create .cab files. But the gem seriously lacks examples. I did lot of research on google but didnt find any sample code to compress files into .cab archive.
Did anyone knows how to create cab archive using ruby-libmspack gem? Is there any other way to create .cab archive in ruby on rails application?
Not Sure About Ruby-libmspack, but lcab can create CAB files on Linux.

CKFinder gem for ruby on rails

I installed the gem ckeditor by tsechingho. But i cant use the edeitor to upload any image on the editor.
Is there any way i can add uplaod images using CKFinder?
CKEditor gem doesn't use CKFinder but allows file/image uploads through a custom file browser.
On the other hand, if you have to use CKFinder, you will need to implement a Rails backend (possibly as an engine like the aforementioned gem). Unfortunately, server side integration docs exist only for v2.

Report generation in rails 3 from query results

I want to generate reports in ruby on rails from any database table or result of join of two tables.
reports should be in different formats such as : pdf ,excel ,csv ,html etc..
Is this possible in rails 3.2.6.???
I know the ruport gem but don't know how to use it...
You can use a gem like Prawn. There's also a Railscast on how to get started, it's quite simple.
There are various gems are available for different kind of reports like below:
pdf - pdfkit gem, wkhtmltopdf gem, pdftk plugin
https://rubygems.org/gems/wkhtmltopdf
http://rubygems.org/gems/pdfkit
excel - spreadsheet gem
https://rubygems.org/gems/spreadsheet
csv - csv gem
http://rubygems.org/gems/fastercsv
etc..
You can use or utilize as per your requirements.

Single Ruby Gem that parses BOTH xlsx and xls Excel files?

I'm a bit frustrated with the gems out there. It seems like each one does one thing well but not others.
roo parses both xlsx and xls however it doesn't seem to read certain fields correctly and isn't working in each case I need it to.
spreadsheet gem doesn't parse xlsx
rubyXL doesn't parse xls files
Any other suggestions?
Thanks
I would just combine the rubyXL gem and the spreadsheet gem if you're happy with the individual results both provide.

Resources