sysconfig/script_nuance/tools/convert_summary_for_excel.pl
2021-06-07 10:03:42 +08:00

22 lines
338 B
Perl

open(SUM, "$ARGV[0]");
open(EXCEL, ">". "$ARGV[0].excel");
if ($ARGV[0] eq '')
{
print "Converting summary file $ARGV[0] to excel format.\n";
print "Usage: perl $0 SUMMARY_FILE\n";
exit;
}
while(<SUM>)
{
chomp($_);
$_ =~ s/^ +//g;
$_ =~ s/ +$//g;
$_ =~ s/ +/ /g;
$_ =~ s/ /\t/g;
$_ =~ s/%//g;
print EXCEL $_."\n";
}