Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Can't locate object method "set_column" via package "Spreadsheet::WriteExcel"

by vikram007
on Oct 17, 2012 at 09:27 UTC ( #999504=perlquestion: print w/replies, xml ) Need Help??
vikram007 has asked for the wisdom of the Perl Monks concerning the following question:

use Spreadsheet::ParseExcel::SaveParser; use POSIX qw/strftime/; my $parser = Spreadsheet::ParseExcel::SaveParser->new(); my $readxls = $parser->Parse('perl_1.xls'); my $worksheet = $readxls->worksheet('sum-base'); my $sw_workbook = $readxls->SaveAs('perl_2.xls'); $worksheet= $sw_workbook->set_column(2, 2, 10);
<\i am getting error like > Can't locate object method "set_column" via package "Spreadsheet::WriteExcel" at line 23

Replies are listed 'Best First'.
Re: Can't locate object method "set_column" via package "Spreadsheet::WriteExcel"
by marto (Bishop) on Oct 17, 2012 at 09:39 UTC
Re: Can't locate object method "set_column" via package "Spreadsheet::WriteExcel"
by NetWallah (Canon) on Oct 17, 2012 at 15:13 UTC
    "set_column" is a WORKSHEET method, not a WORKBOOK method.
    Your "$sw_workbook" is a Work BOOK.

                 I hope life isn't a big joke, because I don't get it.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://999504]
Approved by Corion
[ovedpo15]: can't I use just use lib $FindBin::Bin/../ bin" asuming that p2 is in ./bin and p1 is in /config? it says "cant find" altought p2 is
[moritz]: ovedpo15 "use lib" is only for .pm files
[moritz]: if you don't have .pm file, you might to use "require" or "do" with an absolute path
[ovedpo15]: I need to use FindBin thought. does FindBin finds only modules? or it can find perl script also?
[moritz]: maybe you should start looking at the documentation of FindBin?

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2018-03-17 20:47 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (226 votes). Check out past polls.