-% $style .= " rowspan=".$cell->{rowspan} if $cell->{rowspan} > 1;
-% $style .= " colspan=".$cell->{colspan} if $cell->{colspan} > 1;
+% $style .= " rowspan=".$cell->{rowspan}
+% if exists $cell->{rowspan} && $cell->{rowspan} > 1;
+% $style .= " colspan=".$cell->{colspan}
+% if exists $cell->{colspan} && $cell->{colspan} > 1;