csrtechnew.ohctech.in/indent_template_excel.php

32 lines
690 B
PHP
Raw Permalink Normal View History

2026-01-07 09:12:10 +05:30
<?php
// indent_template_excel.php
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=indent_upload_template_" . date('Y-m-d') . ".xls");
header("Pragma: no-cache");
header("Expires: 0");
// Excel header
echo "<table border='1'>";
echo "<tr>";
echo "<th>Indent Date</th>";
echo "<th>Activity Code</th>";
echo "<th>Item Code</th>";
echo "<th>Indent Qty</th>";
echo "</tr>";
// Sample data
$sample_data = array(
array(date('Y-m-d'), 'Health Camp', 'ITM001', 10),
);
foreach ($sample_data as $row) {
echo "<tr>";
foreach ($row as $cell) {
echo "<td>" . $cell . "</td>";
}
echo "</tr>";
}
echo "</table>";
?>