| Recommend this page to a friend! |
| Info | Documentation | Reputation | Support forum | Blog | Links |
| Ratings | Unique User Downloads | Download Rankings | ||||
| Total: 2,213 | All time: 1,767 This week: 57 | |||||
| Version | License | PHP version | Categories | |||
| htmlexcel 1.0.2 | Custom (specified... | 5 | Tools |
| Description | Author | ||||||||
This class can convert HTML to Excel spreadsheets. |
|
What is the best PHP export excel class?
Trying to export query to an Excel file
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 |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| 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.