# Excel mashup

**URL:** <https://www.ruby-forum.com/t/excel-mashup/112769>\
**Category:** Ruby\
**Created:** [August 23, 2007, 2:05am UTC](https://www.ruby-forum.com/t/excel-mashup/112769 "2007-08-23T02:05:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnstevenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8dc957/32.png) [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Post date:** [August 23, 2007, 2:05am UTC](https://www.ruby-forum.com/t/excel-mashup/112769/1 "2007-08-23T02:05:03Z")

</div>

I’m using parseexcel ([http://raa.ruby-lang.org/project/parseexcel/](http://raa.ruby-lang.org/project/parseexcel/)) to  
read some excel files from a website after manually downloading them.  
I’d like to avoid the download and read them directly off the web but  
can’t see how to do this. parseexcel uses File.open which requires a  
disk file I guess. In java there are high level interfaces that allow  
you to treat any type of data as an io stream.

is there something I’m missing here? another way to do this?

---

<div class="post-metadata">

**Author:** ![dnstevenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8dc957/32.png) [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Post date:** [August 23, 2007, 3:10am UTC](https://www.ruby-forum.com/t/excel-mashup/112769/2 "2007-08-23T03:10:09Z")

</div>

Dave S. wrote:

> I’m using parseexcel ([http://raa.ruby-lang.org/project/parseexcel/](http://raa.ruby-lang.org/project/parseexcel/)) to  
> read some excel files from a website after manually downloading them.  
> I’d like to avoid the download and read them directly off the web but  
> can’t see how to do this. parseexcel uses File.open which requires a  
> disk file I guess. In java there are high level interfaces that allow  
> you to treat any type of data as an io stream.
> 
> is there something I’m missing here? another way to do this?

Here’s a little code to get you started:

require ‘open-uri’ ;

script = nil ;  
result = nil ;

page = “[http://www.google.com](http://www.google.com)”

begin ;  
result = open(page) {|w| script = w.readlines } ;  
rescue =\> e ;  
puts “e=#{e}, e.class=#{e.class}” ;  
result = [] ;  
end ;

puts “result class=#{result.class}, count=#{result.length}” ; #,  
data=#{result}" ;  
puts “result[0] =\>#{result[0].chomp}\<=” if result[0] ;

I just figured this out the other day when reading Hal F.'s The Ruby  
Way - second edition.

Easy as pie. Pages 706-707.

Todd.

---

<div class="post-metadata">

**Author:** ![dnstevenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8dc957/32.png) [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Post date:** [August 23, 2007, 11:49am UTC](https://www.ruby-forum.com/t/excel-mashup/112769/3 "2007-08-23T11:49:57Z")

</div>

Todd B. wrote:

> I just figured this out the other day when reading Hal F.'s The Ruby  
> Way - second edition.
> 
> Easy as pie. Pages 706-707.
> 
> Todd.

thanks!  
how is that book? I’ve found the pick axe a bit cryptic.

---

<div class="post-metadata">

**Author:** ![dnstevenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8dc957/32.png) [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Post date:** [August 26, 2007, 9:38am UTC](https://www.ruby-forum.com/t/excel-mashup/112769/4 "2007-08-26T09:38:04Z")

</div>

Hi Dave,

On 23/08/07, Dave S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m using parseexcel ([http://raa.ruby-lang.org/project/parseexcel/](http://raa.ruby-lang.org/project/parseexcel/)) to  
> read some excel files from a website after manually downloading them.  
> I’d like to avoid the download and read them directly off the web but  
> can’t see how to do this. parseexcel uses File.open which requires a  
> disk file I guess. In java there are high level interfaces that allow  
> you to treat any type of data as an io stream.
> 
> is there something I’m missing here? another way to do this?

you could use the Roo-Gem ([http://roo.rubyforge.org/](http://roo.rubyforge.org/)). In the new  
version  
0.5.1 it supports reading sheets from an http:// address.

-Thomas

–  
Thomas P.  
removed\_email\_address@domain.invalid  
removed\_email\_address@domain.invalid  
030- 49 78 37 06  
0176 - 75 03 03 04

> **[thopre](https://thopre.wordpress.com/)**
>
> Entwicklungen für die Bühne des Lebens

> **[ThoPre.com is for sale | HugeDomains](https://www.hugedomains.com/domain_profile.cfm?d=thopre.com)**
>
> The leading source brandable domain names. Competitive prices. Excellent service. Get your domain name today.
