PHPackages                             bariew/html2csv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bariew/html2csv

ActiveHelper[Utility &amp; Helpers](/categories/utility)

bariew/html2csv
===============

Converts HTML content to csv

1.0.1(11y ago)07.5k↓50%BSD-4-ClausePHP

Since Sep 30Pushed 11y ago2 watchersCompare

[ Source](https://github.com/bariew/html2csv)[ Packagist](https://packagist.org/packages/bariew/html2csv)[ RSS](/packages/bariew-html2csv/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

HTML to CSV helper.
===================

[](#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.

Usage:
------

[](#usage)

```
    // Loading data
    $htmlContent = '...some data ';
    $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();

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

2

Last Release

4226d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8214f36975034f4134506744cd956e8415491006c1b3512af22bf75f91165f06?d=identicon)[bariew](/maintainers/bariew)

---

Top Contributors

[![bariew](https://avatars.githubusercontent.com/u/827508?v=4)](https://github.com/bariew "bariew (2 commits)")

---

Tags

phphelpercsv

### Embed Badge

![Health badge](/badges/bariew-html2csv/health.svg)

```
[![Health](https://phpackages.com/badges/bariew-html2csv/health.svg)](https://phpackages.com/packages/bariew-html2csv)
```

###  Alternatives

[zjkal/time-helper

一个简单快捷的PHP日期时间助手类库。 a smart PHP datetime helper library.

21128.6k1](/packages/zjkal-time-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
