my $infile = shift;
usage() unless defined $infile && -f $infile;
####
sub usage {
print "csv2xls infile [outfile] [subject]\n";
exit;
}
####
# We store the string width as data in the Worksheet object. We use
# a double underscore key name to avoid conflicts with future names.
#
my $old_width = $worksheet->{__col_widths}->[$col];
####
# Very simple conversion between string length and string width for Arial 10.
# See below for a more sophisticated method.
#
sub string_width {
return length $_[0];
}