Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Accessing .xml files through rubyzip
Graham Stokes
11/5/2006 7:38:00 AM
Hi,
Can anyone please suggest an approach for handling a .zip archive which
contains .xls files ? I want to process the .xls files in turn on the
fly as win32OLE objects to extract cell data and create new charts. Of
course I can do it the long way and just unzip everything first, but I
wonder if there is a neat way of marrying the ZIP and win32OLE objects
so that I can process a directory of zipped and unzipped files "in-line"
so the code doesn't have to break stride to uncompress things. Any ideas
greatly appreciated.
Regards,
Graham Stokes
--
Posted via
http://www.ruby-...
.
2 Answers
vasudevram
11/5/2006 2:00:00 PM
0
Graham Stokes wrote:
> Hi,
>
> Can anyone please suggest an approach for handling a .zip archive which
> contains .xls files ? I want to process the .xls files in turn on the
> fly as win32OLE objects to extract cell data and create new charts. Of
> course I can do it the long way and just unzip everything first, but I
> wonder if there is a neat way of marrying the ZIP and win32OLE objects
> so that I can process a directory of zipped and unzipped files "in-line"
> so the code doesn't have to break stride to uncompress things. Any ideas
> greatly appreciated.
>
> Regards,
>
> Graham Stokes
>
> --
> Posted via
http://www.ruby-...
.
Check the Ruby standard libraries. I know this is possible in Python -
reading a zip file on the fly and processing its contents. Saw a recipe
for it in the Python Cookbook. Something similar is likely to be there
in Ruby's libs. Try checking the Ruby Cookbook too - both the official
one from O'Reilly, and Ryan Davis' (incomplete) one at zenspider.com.
HTH
Vasudev
----------------------------------------------------
Vasudev Ram
Software consulting and training
Dancing Bison Enterprises
http://www.dancin...
"Now creating PDFs from Python is even easier"
- Steve Holden
http://del.icio.us/steve....
----------------------------------------------------
Chilkat Software
11/5/2006 2:12:00 PM
0
My questions would be:
1) Assuming you have the .xls file in-memory, how do you load it
into the win32OLE object and what format does the data have to be in-memory?
In other words: do you need a VARIANT or a byte array/"string"?
2) Forgetting about the zip issue for a moment: is it even possible to load
a .xls into an Excel win32OLE object from memory or must it first be written
to a file?
I don't have these answers, but answering these questions is what you first
need to do...
-Matt
At 08:00 AM 11/5/2006, you wrote:
>Graham Stokes wrote:
> > Hi,
> >
> > Can anyone please suggest an approach for handling a .zip archive which
> > contains .xls files ? I want to process the .xls files in turn on the
> > fly as win32OLE objects to extract cell data and create new charts. Of
> > course I can do it the long way and just unzip everything first, but I
> > wonder if there is a neat way of marrying the ZIP and win32OLE objects
> > so that I can process a directory of zipped and unzipped files "in-line"
> > so the code doesn't have to break stride to uncompress things. Any ideas
> > greatly appreciated.
> >
> > Regards,
> >
> > Graham Stokes
> >
> > --
> > Posted via
http://www.ruby-...
.
>
>Check the Ruby standard libraries. I know this is possible in Python -
>reading a zip file on the fly and processing its contents. Saw a recipe
>for it in the Python Cookbook. Something similar is likely to be there
>in Ruby's libs. Try checking the Ruby Cookbook too - both the official
>one from O'Reilly, and Ryan Davis' (incomplete) one at zenspider.com.
>
>HTH
>Vasudev
>----------------------------------------------------
>Vasudev Ram
>Software consulting and training
>Dancing Bison Enterprises
>
http://www.dancin...
>"Now creating PDFs from Python is even easier"
>- Steve Holden
>
http://del.icio.us/steve....
>----------------------------------------------------
>
>
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.409 / Virus Database: 268.13.28/518 - Release Date: 11/4/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.28/518 - Release Date: 11/4/2006
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Accessing .xml files through rubyzip
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password