P
Pam
Hello:
I am having a problem trying to use print "At ($row, $col) the value is
%s \n",
$worksheet->Cells($row,$col)->{'Value'};
I am trying to get the contents of a cell, this will allow me to check
if the cell is empty
before I wite to it. I only want to write to the Cell if it is empt
but at compilation I get
Can't locate boject method Cells via package
Sspreadsheet::WriteExcel::Worksheet
This is a snippet of my code and modules I have in my perl code
use Spreadsheet:arseExcel;
use Spreadsheet::WriteExcel;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
# Create a new Excel workbook
my $workbook =
Spreadsheet::WriteExcel->new("3GSoftwareCCB_MeetingAgenda$datestamp.xls");
my $worksheet = $workbook->add_worksheet();
# get already active Excel application or open new
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
my $oBook =
Spreadsheet:arseExcel::Workbook->Parse("3GSoftwareCCB_MeetingAgenda$datestamp.xls");
#my $oBook =
$oExcel->Parse("3GSoftwareCCB_MeetingAgenda$datestamp.xls");
$row = 1;
$col = 11;
my $myval;
#Tring to check for empty cell
for(my $row =1 ;
$row <= $total ; $row++) {
$myval = $oBook->{Cells} [$row] [$col];
print "This is my value ($row , $col ) <= $total", This
will only give me the row and col number
$myvalue->{'Valaue'},"\n";
print "At ($row, $col) the value is %s \n",
$worksheet->Cells($row,$col)->{'Value'}; Here I want the
contents
print $row, "\n";
}
I want to check for an empty before I write to it.
If ( $worksheet->Cells($row,$col)->{'Value'} = "")
{
{
$worksheet->write($row, $col, "3G_Platform", $format2);
}
$row= $row + 1;
}
If any one can help me it will be greatly appreciated. I tried
everything I know to
get thsi workin
Thank You,
Pamela
I am having a problem trying to use print "At ($row, $col) the value is
%s \n",
$worksheet->Cells($row,$col)->{'Value'};
I am trying to get the contents of a cell, this will allow me to check
if the cell is empty
before I wite to it. I only want to write to the Cell if it is empt
but at compilation I get
Can't locate boject method Cells via package
Sspreadsheet::WriteExcel::Worksheet
This is a snippet of my code and modules I have in my perl code
use Spreadsheet:arseExcel;
use Spreadsheet::WriteExcel;
use Win32::OLE qw(in with);
use Win32::OLE::Const 'Microsoft Excel';
# Create a new Excel workbook
my $workbook =
Spreadsheet::WriteExcel->new("3GSoftwareCCB_MeetingAgenda$datestamp.xls");
my $worksheet = $workbook->add_worksheet();
# get already active Excel application or open new
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
my $oBook =
Spreadsheet:arseExcel::Workbook->Parse("3GSoftwareCCB_MeetingAgenda$datestamp.xls");
#my $oBook =
$oExcel->Parse("3GSoftwareCCB_MeetingAgenda$datestamp.xls");
$row = 1;
$col = 11;
my $myval;
#Tring to check for empty cell
for(my $row =1 ;
$row <= $total ; $row++) {
$myval = $oBook->{Cells} [$row] [$col];
print "This is my value ($row , $col ) <= $total", This
will only give me the row and col number
$myvalue->{'Valaue'},"\n";
print "At ($row, $col) the value is %s \n",
$worksheet->Cells($row,$col)->{'Value'}; Here I want the
contents
print $row, "\n";
}
I want to check for an empty before I write to it.
If ( $worksheet->Cells($row,$col)->{'Value'} = "")
{
{
$worksheet->write($row, $col, "3G_Platform", $format2);
}
$row= $row + 1;
}
If any one can help me it will be greatly appreciated. I tried
everything I know to
get thsi workin
Thank You,
Pamela