下面是我的代码:
use Spreadsheet::WriteExcel;
my @worksheet ;
my($server_count) = 0;
my($row) = 0;
$worksheet[$server_count] = $workbook->addworksheet("Break Summary");
$worksheet[$server_count]->set_column(0, 0, 60);
$worksheet[$server_count]->set_column(1, 1, 20);
$worksheet[$server_count]->write_string($row, 0, "PositionsSTB" ,$summary_title_format);
$worksheet[$server_count]->write_string(++$row, 0, "Number of distinct accounts breaking" ,$general_format);
&log_info ("\nPOS 0 $break_summary_excel_results[0]");
$worksheet[$server_count]->write_number($row, 1, $break_summary_excel_results[0] ,$general_format);
它打印信息以记录,但不打印到 Excel 中。