Original content (below) and title restored by GrandFather.
Hi,First here is the related snippet of code I want to ask your assistance for :
my $row=1; while ($a = $sth->fetchrow_hashref()) { $worksheet->write_url($row,0, qq({internal:'$a->{OrderID}'!A1})); $worksheet->write($row,0, $a->{OrderID}, $bold); $worksheet->write($row,1, $a->{OrderDate}); $worksheet->write($row,2, $a->{ShippedDate}); $worksheet->write($row,3, $a->{CustomerName}); $worksheet->write($row,4, $a->{ShipVia}); $worksheet->write($row,5, $a->{ShipName}); $worksheet->write($row,6, $a->{ShipAddress}); $worksheet->write($row,7, $a->{ShipCity}); $worksheet->write($row,8, $a->{ShipRegion}); $worksheet->write($row,9, $a->{ShipPostalCode}); $worksheet->write($row,10, $a->{ShipCountry}); $worksheet->write($row,11, $a->{Freight},$number); $freight = $a->{Freight}; $ordttl = $a->{'Total'} + $a->{'Freight'}; $worksheet->write($row,12,$ordttl,$number); $row++; print "Current row number is $row\n";
After $row++ loop how do I maintain the current $row number so I can add other stuff like grand total to be positioned just after $row++ loop in the same worksheet.
As you can see above I am printing the current $row after $row++ loop and it shows that current row is 2 this is not I want, I want the next row after $row++ loop, I hope I have made my question clear enough.
Many many thanks for your help !!
TerryIn reply to Spreadsheet::WriteExcel how to maintain row number by terrykhatri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |