[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Modifying an Excel file with Ruby

chris.hulbert

6/17/2007 11:02:00 AM

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/sp... is out of the question.
And i can't use win32::ole 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

--
Posted via http://www.ruby-....

6 Answers

Axel Etzold

6/17/2007 12:21:00 PM

0

Dear Chris,

just a little googling came up with this:

http://rails.co.za/articles/2006/12/16/excel-ole-automation-with-rub...

HTH,

Axel
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/g...

come

6/18/2007 7:47:00 AM

0

Hi,

I never tried this binding on POI Java library, but it could be useful
to you :

http://poi.apache.org/poi...

Come

On 17 juin, 13:01, Chris Hulbert <chris.hulb...@gmail.com> wrote:
> 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. Sohttp://rubyforge.org/projects/spre... out of the question.
> And i can't use win32::ole 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
>
> --
> Posted viahttp://www.ruby-....


chris.hulbert

6/20/2007 11:40:00 AM

0

> just a little googling came up with this:
> http://rails.co.za/articles/2006/12/16/excel-ole-automation-with-rub...
> HTH,
> Axel

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...
> 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

--
Posted via http://www.ruby-....

Axel Etzold

6/20/2007 12:54:00 PM

0

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 <chris.hulbert@gmail.com>
An: ruby-talk@ruby-lang.org
Betreff: Re: Modifying an Excel file with Ruby

> > just a little googling came up with this:
> >
> http://rails.co.za/articles/2006/12/16/excel-ole-automation-with-rub...
> > HTH,
> > Axel
>
> 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...
> > 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
>
> --
> Posted via http://www.ruby-....

--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/s...

chris.hulbert

6/20/2007 10:53:00 PM

0

Axel Etzold wrote:
> 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.

--
Posted via http://www.ruby-....

Patrick Nicholas

9/14/2008 7:56:00 AM

0

Chris Hulbert wrote:
> Axel Etzold wrote:
>> 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.
>>


Hi Chris,
I am facing same issue for my application, could you share with us if
you find some better solution.
--
Posted via http://www.ruby-....