so .. I tried the add handler route
http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.40/examples/write_handler1.pl .. didnt work for me .. or should I say I couldnt get it working .. so .. I went back to my write_text route by dumping out the cols for each row and adding them in a loop .. and also dropped in the code to set up the array for the col widths
#write text only
if($writetext){
#write text method
my @columns2 = @{ $row };
my $k=0;
for my $column2 ( @columns2 ) {
print "DEBUG: row $i col $k $column2 \n" if $debug;
$worksheet->write_string($i, $k, "$column2" ,$format);
## set up col widths
my $old_width = $worksheet->{__col_widths}->[$k];
my $string_width = string_width($column2);
if (not defined $old_width or $string_width > $old_width) {
$worksheet->{__col_widths}->[$k] = $string_width;
}
## end setup col widths
#inc col
$k++;
}
$i++;
} else {
$worksheet->write_row($i++, 0, $row, $format);
}
There is prob an easier way to do all this, but it works for me ..
Thanks for all your help, it was invaluable ;)
cheers
Mark