+my $y = 2;
+
+my $colhead = $format[0]->{colhead};
+# print header
+$ws->merge_range($y, 1, $y, 5, 'Sales', $colhead);
+$ws->merge_range($y, 6, $y+1, 8, 'Rate', $colhead);
+$ws->merge_range($y, 9, $y, 15, 'Tax', $colhead);
+
+$y++;
+$colhead = $format[0]->{colhead_small};
+$ws->write($y, 1, [ 'Total', 'Exempt customer', 'Exempt package', 'Monthly exemption',
+ 'Taxable' ], $colhead);
+$ws->write($y, 9, 'Estimated', $colhead);
+$ws->write($y, 10, 'Invoiced', $colhead);
+$ws->write($y, 12, 'Credited', $colhead);
+$ws->write($y, 14, 'Net due', $colhead);
+$ws->write($y, 15, 'Collected',$colhead);
+$y++;
+
+# print data
+my $rownum = 1;
+my $prev_row = { pkgclass => 'DUMMY PKGCLASS' };
+
+foreach my $row (@rows) {