Faça o download dos dados da tabela HTML para se destacar
Eu tenho uma tabela, construída em PHP que exibe resultados de uma tabela mysql.
Igual a:
$sql = mysql_query("SELECT * FROM survey");
echo "<table border='1'>
<tr>
<th>Question 1</th>
<th>Question 2</th>
<th>Question 3</th>
<th>Question 4</th>
<th>Question 5</th>
<th>Question 6</th>
<th>Question 7</th>
<th>Question 8</th>
<th>Question 9</th>
<th>Question 10</th>
<th>Question 11</th>
<th>Question 12</th>
<th>Question 13</th>
<th>Question 14</th>
<th>eMail</th>
</tr>";
while ($row = mysql_fetch_array($sql))
{
echo "<tr>";
echo "<td>" . $row['Question1'] . "</td>";
echo "<td>" . $row['Question2'] . "</td>";
echo "<td>" . $row['Question3'] . "</td>";
echo "<td>" . $row['Question4'] . "</td>";
echo "<td>" . $row['Question5'] . "</td>";
echo "<td>" . $row['Question6'] . "</td>";
echo "<td>" . $row['Question7'] . "</td>";
echo "<td>" . $row['Question8'] . "</td>";
echo "<td>" . $row['Question9'] . "</td>";
echo "<td>" . $row['Question10'] . "</td>";
echo "<td>" . $row['Question11'] . "</td>";
echo "<td>" . $row['Question12'] . "</td>";
echo "<td>" . $row['Question13'] . "</td>";
echo "<td>" . $row['Question14'] . "</td>";
echo "<td>" . $row['eMail'] . "</td>";
}
echo "</table>";
O que eu quero fazer é gerar esta tabela em um arquivo do Excel, sem nenhum código-fonte ou marca de tabela. Existe uma maneira de fazer isso? Fiquei impressionado com informações na internet e não tenho certeza do que preciso.
Se possível, prefiro fazer isso apenas com PHP e sem bibliotecas adicionais.