Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum (5) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-10-21 (28 days ago) ![]() | ![]() ![]() ![]() ![]() | Total: 2,045 This week: 11 | All time: 1,914 This week: 44![]() |
Version | License | PHP version | Categories | |||
htmlexcel 1.0.2 | Custom (specified... | 5 | Utilities and Tools |
Description | Author | ||||||||
This class can convert HTML to Excel spreadsheets. Recommendations What is the best PHP export excel class? |
|
Turn HTML tables into multi-sheet Excel files.
require_once('HtmlExcel.php');
$css = "
.red {
color: red;
}";
$numbers = '<table>
<tr>
<td class="red">1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td class="red">5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td class="red">9</td>
</tr>
</table>';
$names = '<table>
<tr>
<th>First name</th>
<th>Last name</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
<tr>
<td>Jane</td>
<td>Doe</td>
</tr>
</table>';
$xls = new HtmlExcel();
$xls->setCss($css);
$xls->addSheet("Numbers", $numbers);
$xls->addSheet("Names", $names);
$xls->headers();
echo $xls->buildFile();
![]() |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() ![]() |
Lic. | License text |
![]() ![]() |
Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | User Comments (1) | ||||||||||||||||||||||||||||||||||
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.