For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > September 2006 > Spreadsheet::ParseExcel on Windows with out Win32::OLE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Spreadsheet::ParseExcel on Windows with out Win32::OLE
Pam

2006-09-26, 6:59 pm

Hello:

I was wondering if anyone knew if it was possible to Parse a file in
the Windows
enviroment without using the Win32::OLE? Most of the sample code I see
is either
writen for UNIX/Linux or Win32:OLE. Currently I have a Perl script
running on Unix
on a cron job that works fine and I wrote it in the Windows enviroment
but used the
Spreadsheet:WriteExcel module and other modules which also works in the
UNIX enviroment. Now I am trying to add more code that will parse the
file for a value. But I am having the hardest time I work in the
Windows enviroment and the code is put on UNIX by another group so
right now I don't have access to UNIX so my code must be written in
Windows. Since previous code was writen using Spreadsheet::WriteExcel,
OLE dosen't seem to work with existing code because one writes to a
sheet and Win32::OLE uses Workbook at least that is my conclusion from
all of my efforts in trying to get my code working. I am trying to
parse an existing spreadsheet with

$oBook = Spreadsheet::ParseExcel::Workbook->Parse($original_file)

Am I correct in my conclusions? If anyone can answer this I would
greatly appreciate it.


Pam

Mumia W. (reading news)

2006-09-26, 6:59 pm

On 09/26/2006 04:34 PM, Pam wrote:
> Hello:
>
> I was wondering if anyone knew if it was possible to Parse a file in
> the Windows
> enviroment without using the Win32::OLE? Most of the sample code I see
> is either
> writen for UNIX/Linux or Win32:OLE. Currently I have a Perl script
> running on Unix
> on a cron job that works fine and I wrote it in the Windows enviroment
> but used the
> Spreadsheet:WriteExcel module and other modules which also works in the
> UNIX enviroment. Now I am trying to add more code that will parse the
> file for a value. But I am having the hardest time I work in the
> Windows enviroment and the code is put on UNIX by another group so
> right now I don't have access to UNIX so my code must be written in
> Windows. Since previous code was writen using Spreadsheet::WriteExcel,
> OLE dosen't seem to work with existing code because one writes to a
> sheet and Win32::OLE uses Workbook at least that is my conclusion from
> all of my efforts in trying to get my code working. I am trying to
> parse an existing spreadsheet with
>
> $oBook = Spreadsheet::ParseExcel::Workbook->Parse($original_file)
>
> Am I correct in my conclusions? If anyone can answer this I would
> greatly appreciate it.
>
>
> Pam
>


You are correct. Win32::OLE most probably won't work with code written
for Spreadsheet::{Parse,Write}Excel.

--
paduille.4058.mumia.w@earthlink.net
Pam

2006-09-26, 6:59 pm


Mumia W. (reading news) wrote:
> On 09/26/2006 04:34 PM, Pam wrote:
>
> You are correct. Win32::OLE most probably won't work with code written
> for Spreadsheet::{Parse,Write}Excel.
>
> --
> paduille.4058.mumia.w@earthlink.net



Hi

Do you know if Spreadsheet::ParseExcel can work on Windows without
using
Win32::OLE?


Pam

Matt Garrish

2006-09-26, 6:59 pm


Pam wrote:

> Mumia W. (reading news) wrote:
[color=darkred]
[color=darkred]
>
> Do you know if Spreadsheet::ParseExcel can work on Windows without
> using
> Win32::OLE?
>


Could you please point out the exact passage in the ParseExcel
documentation where it says that Win32::OLE is required? I'm having
trouble finding it.

Matt

Matt Garrish

2006-09-26, 6:59 pm


Pam wrote:

> Mumia W. (reading news) wrote:
[color=darkred]
[color=darkred]
>
> Do you know if Spreadsheet::ParseExcel can work on Windows without
> using
> Win32::OLE?
>


Could you please point out the exact passage in the ParseExcel
documentation where it says that Win32::OLE is required? I'm having
trouble finding it.

Matt

Mumia W. (reading news)

2006-09-26, 6:59 pm

On 09/26/2006 06:11 PM, Pam wrote:
> Mumia W. (reading news) wrote:
>
>
> Hi
>
> Do you know if Spreadsheet::ParseExcel can work on Windows without
> using
> Win32::OLE?
>
>
> Pam
>


I've had no experience with Spreadsheet::ParseExcel outside of Linux.
However, there is a 99% + 1% chance that Spreadsheet::ParseExcel has no
dependency upon Win32::OLE since Win32::OLE only works under Windows,
and Spreadsheet::ParseExcel doesn't only work under Windows.

Try it for yourself. See if you can write a perl script that uses
Spreadsheet::ParseExcel and not Win32::OLE to parse an Excel file.


--
paduille.4058.mumia.w@earthlink.net
Pam

2006-09-27, 7:01 pm



Mumia W. (reading news) wrote:
> On 09/26/2006 06:11 PM, Pam wrote:
>
> I've had no experience with Spreadsheet::ParseExcel outside of Linux.
> However, there is a 99% + 1% chance that Spreadsheet::ParseExcel has no
> dependency upon Win32::OLE since Win32::OLE only works under Windows,
> and Spreadsheet::ParseExcel doesn't only work under Windows.
>
> Try it for yourself. See if you can write a perl script that uses
> Spreadsheet::ParseExcel and not Win32::OLE to parse an Excel file.
>
>
> --
> paduille.4058.mumia.w@earthlink.net



Hello:

My original question stated the I was trying to parse an existing Excel
file and all of the exmples I have seem to specify using on Win32:OLE
for Windows or Spreadsheet_ParseExcel on UNIX/Linux.

I'm not saying that SpreadSheet::ParseExcel has to be used with
Win32::OLE.
I'm saying that when I have looked for sample code it points me to
Win32:OLE for parsing in Windows enviorment.

But I want to use code that will work on Windows or UNIX because the
script will be put on UNIX for the cron job.

I have tried and tried and I can't get the Spreadsheet::ParseExcel to
work in my Windows enviroment. My original script gets its nformation
from a database, that coma seperated data is parsed using Text:CSV I
create a workbook using Spreadsheet::WriteExcel to put that data into
a sheet and also to do other formating to that spreadsheet. So now I
want to parse that same spreadsheet to see if a cell is defined or
undef.


I can't get Spreadsheet::ParseExcel to work in my Windows enviroment.
Can someone/anyone point me to some sample code that uses
Spreadsheet:Parse excel in Windows enviroment.



Thank You All,
Pamela

Mumia W. (reading news)

2006-09-27, 7:01 pm

On 09/27/2006 11:56 AM, Pam wrote:
>
> Mumia W. (reading news) wrote:
>
>
> Hello:
>
> My original question stated the I was trying to parse an existing Excel
> file and all of the exmples I have seem to specify using on Win32:OLE
> for Windows or Spreadsheet_ParseExcel on UNIX/Linux.
>
> I'm not saying that SpreadSheet::ParseExcel has to be used with
> Win32::OLE.
> I'm saying that when I have looked for sample code it points me to
> Win32:OLE for parsing in Windows enviorment.
>
> But I want to use code that will work on Windows or UNIX because the
> script will be put on UNIX for the cron job.
>
> I have tried and tried and I can't get the Spreadsheet::ParseExcel to
> work in my Windows enviroment. My original script gets its nformation
> from a database, that coma seperated data is parsed using Text:CSV I
> create a workbook using Spreadsheet::WriteExcel to put that data into
> a sheet and also to do other formating to that spreadsheet. So now I
> want to parse that same spreadsheet to see if a cell is defined or
> undef.
>
>
> I can't get Spreadsheet::ParseExcel to work in my Windows enviroment.
> Can someone/anyone point me to some sample code that uses
> Spreadsheet:Parse excel in Windows enviroment.
>
>
>
> Thank You All,
> Pamela
>


It sounds like your main problem is lack of access to the documentation
for Spreadsheet::ParseExcel:

http://search.cpan.org/~kwitknr/Spr...3/ParseExcel.pm

It should also be on your computer. With Linux, when the module is
installed, the documentation is also automatically installed. If you
have ActiveState Perl for Windows, this is probably also the case.

Search in the Programs menu under Perl or Active State or Modules or
other places. Also, you should be able to use the command line utility
"perldoc." Open a command prompt and type "perldoc perl" like so:

C:\> perldoc perl

The command "perldoc Spreadsheet::ParseExcel" should show the module's
documentation:

C:\> perldoc Spreadsheet::ParseExcel



--
paduille.4058.mumia.w@earthlink.net
Matt Garrish

2006-09-27, 7:01 pm


Mumia W. (reading news) wrote:

> On 09/27/2006 11:56 AM, Pam wrote:
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> It sounds like your main problem is lack of access to the documentation
> for Spreadsheet::ParseExcel:
>
> http://search.cpan.org/~kwitknr/Spr...3/ParseExcel.pm
>


No, I think her real problem is she doesn't know Perl and she's trying
to hack things together from examples on the web in the hopes something
miraculous will come of it (probably examples that pre-date the
ParseExcel module, from the sound of it). She should take a couple of
steps back and learn some basic Perl (like how to determine if a
variable is defined).

Matt

Mumia W. (reading news)

2006-09-27, 7:01 pm

On 09/27/2006 11:56 AM, Pam wrote:
> [...]
> I can't get Spreadsheet::ParseExcel to work in my Windows enviroment.
> Can someone/anyone point me to some sample code that uses
> Spreadsheet:Parse excel in Windows enviroment.
> [...]
>


I sent a demo program with demo data to your e-mail.

--
paduille.4058.mumia.w@earthlink.net
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com