newperlbie has asked for the wisdom of the Perl Monks concerning the following question:
All the lines from the text file are written to the excel but after a few lines(random) the coloring stops.The next lines are just written in black. What is my mistake?my $workbook = Spreadsheet::WriteExcel->new("output.xls"); my $worksheet = $workbook->add_worksheet("overview"); my $colCount = 0; my $rowCount = 0; open my $tf, "output.txt" or die "Cannot open file"; while(my $line = <$tf>) { if ( $line =~ /.*versions are SAME.*/) { my $header1 = $workbook->addformat(bold => 0, color => 'green', size => 10, merge => 0, ); $worksheet->set_column($colCount, $colCount, 30); print $line; #this is a dummy line $worksheet->write($rowCount,$colCount,$line,$header1); $rowCount++; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl 2 Excel
by Eily (Monsignor) on Aug 21, 2018 at 13:15 UTC | |
by newperlbie (Acolyte) on Aug 21, 2018 at 13:36 UTC | |
by marto (Cardinal) on Aug 21, 2018 at 13:42 UTC | |
|
Re: Perl 2 Excel
by newperlbie (Acolyte) on Aug 21, 2018 at 12:54 UTC | |
by pryrt (Abbot) on Aug 21, 2018 at 13:21 UTC | |
by Aldebaran (Curate) on Aug 21, 2018 at 21:11 UTC | |
by pryrt (Abbot) on Aug 21, 2018 at 21:35 UTC | |
by Eily (Monsignor) on Aug 21, 2018 at 22:39 UTC | |
by newperlbie (Acolyte) on Aug 21, 2018 at 13:37 UTC | |
by holli (Abbot) on Aug 21, 2018 at 15:04 UTC | |
by newperlbie (Acolyte) on Aug 22, 2018 at 09:53 UTC | |
|