..in realtà avrei risolto semplicemente così:
header("Content-type: application/vnd.ms-excel");
header ("Content-Disposition: inline; filename=export.xls");
MA l'esportazione vorrei fosse associata ad un pulsante/testo, successivo alla tabella di presentazione dei dati.
Come è ora invece:
while ($row = mysql_fetch_assoc($result)) {
$rag = htmlentities($row['rag_re']);
$cod = htmlentities($row['cod_re']);
$prov = htmlentities($row['pro]);
$codc = htmlentities($row['cod_c']);
echo "<tr>
<td>$rag</td>
<td>$cod</td>
<td>$prov</td>
<td>$codc</td>
</tr>";
}
echo '</table>';
header("Content-type: application/vnd.ms-excel");
header ("Content-Disposition: inline; filename=export.xls");
non visualizzo la tabella di output, ma salvo direttamente....
come faccio?
grazie

Rispondi quotando