in reply to spreadsheet::WriteExcel and whos on first?
gives me a non-empty spreadsheet, but I don't think even that is close to what you want. You are overwriting the spreadsheet on every iteration of your loop, and your row variable is in the column argument of the write() method. First maybe you want to create the spreadsheet outside of the loop?my $workbook = Spreadsheet::WriteExcel->new('newproduct.xls'); my $worksheet = $workbook->add_worksheet(); # open FILE2, '>','newproducts.txt' or die $!; my $valB = $sheet->{Cells}[$row][1]->{Val}; # print FILE2 "New Product: = $valA Price = $valB\n"; # close FILE2; $worksheet->write (0, $row+1, "valA"); $worksheet->write (1, $row+1, "valB");
|
|---|