--- sql2xls.cgi 2008/11/03 18:44:42 6 +++ sql2xls.cgi 2008/11/03 18:51:49 8 @@ -86,7 +86,7 @@ print STDERR "working on $sql_file\n" if ($debug); open(SQL,$sql_file) || die "can't open sql file '$sql_file': $!"; - my $comment; + my $comment = ''; my $sql = ""; while() { chomp; @@ -114,6 +114,9 @@ my $fmt_comment = $workbook->addformat(); # Add a format $fmt_comment->set_bold(); + $comment =~ s/^\s+//; + $comment =~ s/\s+$//; + $worksheet->write($row, 0, _c($comment), $fmt_comment); $row+=2; }