Amphiaraus has asked for the wisdom of the Perl Monks concerning the following question:
I find the the call to my $template $parser->Parse('Build_Scheduler.xlsx') fails and returns "undefined", causing the later call my $worksheet = $template->worksheet(0) to fail. My Perl version is Strawberry 5.18.1001 Can someone let me know why my#!C:\strawberry\perl\bin\perl.exe use strict; use warnings; use Spreadsheet::ParseExcel; use Spreadsheet::ParseExcel::SaveParser; # Specify cell H2’s row and col my $row = 1; my $col = 7; my $worksheet_num = 0; # Create a parser that can read/write/display cells in an existing Exc +el spreadsheet my $parser = Spreadsheet::ParseExcel::SaveParser->new(); if ($parser) { print "parser is defined\n"; } else { print "parser is NOT defined\n"; } # Parse the ‘Build_Scheduler.xlsx’ spreadsheet my $template = $parser->Parse('Build_Scheduler.xlsx'); if ($template) { print "template is defined\n"; } else { print "template is NOT defined\n"; } # Specify leftmost tab (“0”) as the worksheet to be modified my $worksheet = $template->worksheet(0) || die("$@$!"); # Overwrite the AsOf string value in tab = “Monday”, cell H2. (05/05/2 +016 2:00PM is replaced by 05/05/2016 2:00PM) $worksheet->AddCell( $row, $col, '05/12/2016 2:00PM' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Having Problems with Spreadsheet::ParseExcel::SaveParser Parse() function
by Athanasius (Archbishop) on May 09, 2016 at 15:05 UTC | |
|
Re: Having Problems with Spreadsheet::ParseExcel::SaveParser Parse() function
by Corion (Patriarch) on May 09, 2016 at 15:02 UTC | |
|
Re: Having Problems with Spreadsheet::ParseExcel::SaveParser Parse() function
by toolic (Bishop) on May 09, 2016 at 15:04 UTC | |
by Amphiaraus (Beadle) on May 10, 2016 at 12:58 UTC |