helper html2csv
Converts HTML content to csv
bariew/html2csv
Converts HTML content to csv
- Tuesday, October 21, 2014
- by bariew
- Repository
- 2 Watchers
- 0 Stars
- 3,464 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 8 % Grown
HTML to CSV helper.
Converts html to csv.
Common case is when you already have all data for csv - rendered in html table.
With this helper you can take your html content and place it into csv file.
Default raw selector is 'thead, tr', and cell selector 'th, td' - but you may redefine them., (*1)
Usage:
// Loading data
$htmlContent = '<table>...some data </table>';
$csv = new Html2Csv($htmlContent);
$csv->toFile("report.csv");
exit(0);
// Advanced usage:
$csv = new Html2Csv($htmlContent, [
'cellDelimiter' => "\t",
'cellEnclosure' => '"',
'rowSelector' => 'div.row',
'cellSelector' => 'div.cell'
]);
return $csv->toArray();
dev-master
9999999-dev
Converts HTML content to csv
Sources
Download
BSD-4-Clause
The Requires
by
Bariev Pavel
csv
php
helper
1.0.1
1.0.1.0
Converts HTML content to csv
Sources
Download
BSD-4-Clause
The Requires
by
Bariev Pavel
csv
php
helper
1.0.0
1.0.0.0
Converts HTML content to csv
Sources
Download
BSD-4-Clause
The Requires
by
Bariev Pavel
csv
php
helper