Ruby and Excel and colour question

A

Axel Etzold

Dear all,

I need to be able to write a file in Excel format, where the
fields have different background colours based on
some condition which is evaluated based on the entries
at runtime.
I tried to look at the spreadsheet gem, but couldn't figure out how to do it. I'd much prefer if you could point me to a solution that
is platform-independent (Excel files can be opened
from OpenOffice etc.) and/or would work together with JRuby.

Thank you very much !

Best regards,

Axel
 
T

Thomas E Enebo

Dear all,

I need to be able to write a file in Excel format, where the
fields have different background colours based on
some condition which is evaluated based on the entries
at runtime.
I tried to look at the spreadsheet gem, but couldn't figure out how to do it. I'd much prefer if you could point me to a solution that
is platform-independent (Excel files can be opened
from OpenOffice etc.) and/or would work together with JRuby.

OpenOffice has some Java API support for accessing and manipulating
files. I have not tried it, but I know there are examples of doing it
from Java. JRuby should be able to access those Java classes just
fine.

-Tom
 
M

Mark Thomas

Dear all,

I need to be able to write a file in Excel format, where the
fields have different background colours based on
some condition which is evaluated based on the entries
at runtime.
I tried to look at the spreadsheet gem, but couldn't figure out how to doit. I'd much prefer if you could point me to a solution that
is platform-independent (Excel files can be opened
from OpenOffice etc.) and/or would work together with JRuby.

The most popular platform-independent Excel creation library is POI
(http://poi.apache.org). It's a java library so you should be able to
use it from JRuby. You should be able to put in the formulas that
change the background color based on runtime content.

- Mark.
 
G

Gilbo

Dear all,

I need to be able to write a file in Excel format, where the
fields have different background colours based on
some condition which is evaluated based on the entries
at runtime.
I tried to look at the spreadsheet gem, but couldn't figure out how to doit. I'd much prefer if you could point me to a solution that
is platform-independent (Excel files can be opened
from OpenOffice etc.) and/or would work together with JRuby.

Thank you very much !

Best regards,

Axel

Axel,

have a look at surpass - it might be enough for what you want
(not sure about JRuby support though)

http://surpass.rubyforge.org/

HTH

Mike
 
S

steve

Gilbo said:
Axel,

have a look at surpass - it might be enough for what you want
(not sure about JRuby support though)

http://surpass.rubyforge.org/

HTH

Mike

Wow! Surpass looks amazing! I was thinking of using jruby to invoke the
java package OpenXLS to satisfy a similar requirement, but if this works
it will be much easier.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,159
Messages
2,570,881
Members
47,418
Latest member
NoellaXku

Latest Threads

Top