I have a html table in this format:
<table>
<tr>
<td></td>
<td></td>
</tr>
</table>
And I have a download button:
<input type="text" name="download" value="Download">
I need this table to be exported/downloaded in ms word format when user clicks on the Download button. Please help me with the codes to achieve this. Thanks in advance
you may try the simple solution in setting your script header
header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment;Filename=YOUR_DOC_NAME.doc");
echo '<table>....';
that will force your user to download all the echo into ms-word document