I've created an excel attachment containing an html table that sends using mail().
I'd like to extend that by including multiple tables in different worksheets in the same workbook.
Currently my $message = // The first table.
my $headers are:
$headers .= 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'Content-Disposition: attachment; filename=Tables.xls' . "\r\n"; $headers .= "From: email@example.com" . "\r\n" . "Reply-To: firstname.lastname@example.org" . "\r\n" . "X-Mailer: PHP/" . phpversion();
with mail($to, $subject, $message, $headers).
How would I go about creating another worksheet in that same file with a different message, i.e. table?