Download Daten aus HTML-Tabelle zu übertreffen

Ich habe eine in PHP erstellte Tabelle, die Ergebnisse einer MySQL-Tabelle anzeigt.

Wie so:

$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>";

Ich möchte diese Tabelle in eine Excel-Datei ohne Quellcode oder Tabellen-Tags ausgeben. Gibt es eine Möglichkeit, wie ich das machen kann? Ich bin mit Informationen im Internet überfordert und weiß nicht genau, was ich brauche.

Wenn möglich, würde ich es vorziehen, dies nur mit PHP und ohne zusätzliche Bibliotheken zu tun.

Antworten auf die Frage(6)

Ihre Antwort auf die Frage