/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php //$HTML_Code is where the actual HTML table goes //If you don't add a border around your table the border won't show up when you //download the excel file. $HTML_Code = " <table style=\"border: 2px solid black;\"> <tr> <td>Row1 Col1</td> <td>Row1 Col2</td> <td>Row1 Col3</td> </tr> <tr> <td>Row2 Col1</td> <td>Row2 Col2</td> <td>Row2 Col3</td> </tr> </table> "; //$Build file will create the excel file called file_name.xls //$Build file doesn't add the contents/code into the file. //$Edit_File add the HTML table to the excel file. if(!$Edit_File) { } ?>
Comments
