[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

How to open an xls file

Houdev Houdev

2/5/2008 5:52:00 PM

Hi,
I have a blocking problem and I really need urgent help.
i'm very new in ruby and i find it great...
I woudl like to open an xls file, but I get the following error :
*****************
c:/ruby/lib/ruby/site_ruby/1.8/parseexcel/olestorage.rb:353:in
`get_header': OLE::UnknownFormatError (OLE::UnknownFormatError
from
c:/ruby/lib/ruby/site_ruby/1.8/parseexcel/olestorage.rb:110:in
`initialize'
from c:/ruby/lib/ruby/site_ruby/1.8/parseexcel/parser.rb:172:in
`new'
from c:/ruby/lib/ruby/site_ruby/1.8/parseexcel/parser.rb:172:in
`parse'
from
c:/ruby/lib/ruby/site_ruby/1.8/parseexcel/parseexcel.rb:10:in `parse'
******************
I installed parseexcel lib of course, but noo progress.
Thanks for your help all

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

3 Answers

Stéphane Wirtel

2/5/2008 6:03:00 PM

0

You can use the roo gem, or jruby and the library POI.

Good luck

Thomas Preymesser

2/5/2008 8:01:00 PM

0

On 05/02/2008, Houdev Houdev <houdev@gmail.com> wrote:
>
> Hi,
> I have a blocking problem and I really need urgent help.
> i'm very new in ruby and i find it great...
> I woudl like to open an xls file, but I get the following error :


Are you sure, your .xls file is really an excel file? How do you have
created this file?
Can you post the code how you have used the parseexcel gem?

-Thomas



--=20
Thomas Preymesser
thopre@gmail.com
thomas@thopre.com
B=FCro: 030 - 830 353 88
mobil: 0176 - 75 03 03 04
Privat: 030 - 49 78 37 06
http://thopre.word...
http://www.t...

Houdev Houdev

2/6/2008 9:54:00 AM

0

Thomas Preymesser wrote:
> On 05/02/2008, Houdev Houdev <houdev@gmail.com> wrote:
>>
>> Hi,
>> I have a blocking problem and I really need urgent help.
>> i'm very new in ruby and i find it great...
>> I woudl like to open an xls file, but I get the following error :
>
>
> Are you sure, your .xls file is really an excel file? How do you have
> created this file?
> Can you post the code how you have used the parseexcel gem?
>
> -Thomas
>
>
>
> --
> Thomas Preymesser
> thopre@gmail.com
> thomas@thopre.com
> Büro: 030 - 830 353 88
> mobil: 0176 - 75 03 03 04
> Privat: 030 - 49 78 37 06
> http://thopre.word...
> http://www.t...

Hi and thanks fo ryoru answer,
I download the xls file from a website as follows :
Net::HTTP.start("www.casablanca-bourse.com") { |http|
resp = http.get("/cgi/ASP/Marche_Central/TelechargerDonnees.asp")
open("Donnes_Bourse.xls", "wb") { |file|
file.write(resp.body)
}
}

Is there something wrong with this code ?
Thanks for help

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