Modifying an Excel file with Ruby

C

Chris Hulbert

Hi all,
I have an Excel XLS file that is full of pre-existing charts, formulas,
worksheets, etc.
I need to be able to open it up, fill in a hidden worksheet with some
values from a database, and save it out again without losing all the
charts/formulas/worksheets/etc. So
http://rubyforge.org/projects/spreadsheet/ is out of the question.
And i can't use win32::eek:le because i won't be hosting on a windows
server.

Does anyone have any ideas? I'm even considering shelling out to a perl
or python script, but i thought i'd look here first.

Thanks in advance,
Chris
 
C

Chris Hulbert

just a little googling came up with this:

Hi,
Thanks, but i can't use OLE because this won't be hosted on windows.
I never tried this binding on POI Java library, but it could be useful
to you :
http://poi.apache.org/poi-ruby.html
Come

Fair enough, i assumed i'd have to use a java or perl or python library.
Its a pity, because an all-ruby solution keeps the cost of hosting down
:)

Any all-ruby solutions? I guess i *could* go to the effort of porting
the python pyExcelarator library to ruby, it's the closest to what i'm
after, but if there's an solution already out there, i'd like to hear
about it.

Cheers
 
A

Axel Etzold

Dear Chris,

Hi,
Thanks, but i can't use OLE because this won't be hosted on windows.

the claim in the link I sent you was that they
do use Linux, rather than Windows, and still
got (some workaround access to) OLE to work ..
But I haven't tried this myself, so I wrote
"just a little googling" .... but I'd be interested
if you could post what solution you eventually go for.

Best regards,

Axel


-------- Original-Nachricht --------
Datum: Wed, 20 Jun 2007 20:40:25 +0900
Von: Chris Hulbert <[email protected]>
An: (e-mail address removed)
Betreff: Re: Modifying an Excel file with Ruby
 
C

Chris Hulbert

Axel said:
the claim in the link I sent you was that they
do use Linux, rather than Windows, and still
got (some workaround access to) OLE to work ..
But I haven't tried this myself, so I wrote
"just a little googling" .... but I'd be interested
if you could post what solution you eventually go for.

Best regards,

Axel

Cheers buddy, I must have switched off the moment i saw 'ole' in the
URL.
I had a read, and it appears he got it to work using WINE. Clever trick,
and i guess you could do that if you owned the server yourself (or you
had a *really* good virtual hosting package) but for my situation (using
a typical rails host) it probably isn't going to help.
Still, thanks for the pointer.
 
P

Patrick Nicholas

Hi Chris,
I am facing same issue for my application, could you share with us if
you find some better solution.
 
C

Christopher Small

I too am interested in this question. I'll definitely post what I find
out and hope to hear from others.
 
C

Chris Hulbert

Christopher said:
I too am interested in this question. I'll definitely post what I find
out and hope to hear from others.

This is your best bet:
http://poi.apache.org/poi-ruby.html

I've tried the .net version of POI, it's great - far better than any
other open source excel libraries. I can only assume the java and ruby
versions are good too.
 

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

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top