From: Jim Gibson on
In article <9NmdnVWd0dsv5t_RnZ2dnUVZ_qCdnZ2d(a)giganews.com>, PerlTrainee
<user(a)compgroups.net/> wrote:

> I have installed the ParseExcel v0.57 module and I read on CSPAN that this
> module contains SaveParser. So I don't think I need to install another
> package. I am running Perl 5.12. Is it possible that this module does not
> support this version of Perl?

The Spreadsheet::ParseExcel::SaveParser (SPESP) module depends upon
these modules:

Spreadsheet::ParseExcel;
Spreadsheet::ParseExcel::SaveParser::Workbook;
Spreadsheet::ParseExcel::SaveParser::Worksheet;
Spreadsheet::WriteExcel;

You can see this from the source, which can be displayed using the
command-line

perldoc -m Spreadsheet::ParseExcel::SaveParser

or the web page

<http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-ParseExcel-0.57/li
b/Spreadsheet/ParseExcel/SaveParser.pm>

It is possible you need to have compatible versions of all five modules
for the modules to work.

Note that SPESP was moribund for many years and has been taken over by
a new maintainer, who has placed the following warning in the source
code:

"Please note that this module is currently (versions 0.50-0.60)
undergoing a major restructuring and rewriting."

Thus, problems can be anticipated.

If you can't wait for these problems to be fixed, and if your
requirements are modest, you may be able to use the
Spreadsheet::ParseExcel and SpreadSheet::WriteExcel modules to copy an
existing spreadsheet and updates it contents.

--
Jim Gibson
From: Justin C on
In article <slrni466pb.a6c.hjp-usenet2(a)hrunkner.hjp.at>, Peter J. Holzer wrote:
> On 2010-07-18 10:34, Justin C <justin.1007(a)purestblue.com> wrote:

[snip]
>>
>> I got your code to work by changing the above line to:
>> my $workbook2 = $parser2->Parse('C:\writeMe.xls');
>> (note the upper-case 'P' ^ here)
>>
>> I don't pretend to be an expert, but I've done some investigation and I
>> find that there are two methods defined: Parse, and parse, but they are
>> not the same! The one with the upper-case P is in
>> Spreadsheet::ParseExcel::SaveParser, the other is in
>> Spreadsheet::ParseExcel.
>
> They could even both be spelled the same.
>
> $parser is an object of the class 'Spreadsheet::ParseExcel', so
> $parser->parse() calls Spreadsheet::ParseExcel::parse.
>
> $parser2 is an object of the class
> 'Spreadsheet::ParseExcel::SaveParser', so $parser2->Parse() calls
> Spreadsheet::ParseExcel::SaveParser::Parse().
>
>
>> I use modules in a lot of what I code, but when they are like this I
>> don't really understand what is going on. I mean, is S::PE::SP dependant
>> on S::PE? Could ...SaveParser be installed without S::PE?
>
> Maybe. It depends on how S::PE::SP is written. The documentation of
> S::PE::SP should answer your questions. If it doesn't mention S:PE at
> all, then S::PE::SP is probably completely independent of S::PE.
>
>> If I "use
>> S::PE::SP" does S::PE automatically get "used" as well?
>
> No. S::PE::SP may use S::PE, but if it does, any symbols exported by
> S::PE are only imported into S::PE::SP, not into your current package.
>
> Note that in object-oriented Perl, symbols are not usually exported:
> Instead the full class name is used for class methods like new, and
> instance methods are referenced via the object anyway. So if you use
> class A and class A uses class B, you can use class B just as if you had
> used it yourself.

Thank you for the explanation.

Justin.

--
Justin C, by the sea.