Signalwerk - Web-Code-Library

Excel-Tabelle an Browser senden

Header mit PHP senden:

header('Content-Disposition: attachment; filename="Tab.xls"');
header('Content-Type: application/vnd.ms-excel');


Inhalt der Excel-Tabelle ausgeben

<!DOCTYPE html>
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<style>
body {
font-family:arial;
}
table td {
font-size:11px;
}
thead td {
font-weight:bold;
}
</style>
</head>
<body>
<table border=0 cellpadding=0 cellspacing=0>
<thead>
<tr>
<td>Überschrift</td>
</tr>
</thead>
<tr>
<td>Zelle</td>
</tr>
</table>
</body>
</html>

Zurück zur Web-Code-Lib