PHPackages                             leewillis77/wplisttableexportable - 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. leewillis77/wplisttableexportable

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

leewillis77/wplisttableexportable
=================================

WP\_List\_Table\_Exportable is an (almost) drop-in replacement for the WP\_List\_Table class that lets users export the current page of data to CSV with a simple click.

v2.0.2(9mo ago)1124[1 issues](https://github.com/leewillis77/WpListTableExportable/issues)GPL-2.0-onlyPHP

Since Jun 7Pushed 9mo ago3 watchersCompare

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

READMEChangelogDependenciesVersions (14)Used By (0)

WP\_List\_Table\_Exportable
===========================

[](#wp_list_table_exportable)

What?
-----

[](#what)

WP\_List\_Table\_Exportable is an (almost) drop-in replacement for the WP\_List\_Table class that lets users export the current page of data to CSV with a simple click.

[![Alt text for your video](/assets/demo-shot.png)](https://www.youtube.com/watch?v=dFUGJP7Mpnc)

### Export link included in list table

[](#export-link-included-in-list-table)

[![Screenshot of export link](/assets/screenshot-1.png?raw=true)](/assets/screenshot-1.png?raw=true)

### CSV Output compatible with your favourite spreadsheet app

[](#csv-output-compatible-with-your-favourite-spreadsheet-app)

[![Screenshot of resulting CSV file](/assets/screenshot-2.png?raw=true)](/assets/screenshot-2.png?raw=true)

Why…
----

[](#why)

I wanted to add CSV Export functionality to an existing WP\_List\_Table implementation in the [Cart Recovery for WordPress Pro](https://wp-cart-recovery.com/downloads/cart-recovery-wordpress-pro/) plugin.

My initial implementation required a lot of custom code, bodges, and workarounds. It generally seemed like something which should be generic, and simpler. So I gave it a go. WP\_List\_Table\_Exportable is the result.

How…
----

[](#how)

If you want to use the class, here's what you can do.

### Option 1 - Using [composer](https://getcomposer.org/)

[](#option-1---using-composer)

- Add the repo as a dependency:

```
$ composer require leewillis77/wplisttableexportable
```

- Extend `leewillis77\WpListTableExportable\WpListTableExportable` instead of `WP_List_Table`
- Your plugin will need to invoke `leewillis77\WpListTableExportable\Bootstrap` on any request that would result in the list table being shown *as early as practical* in the request lifecycle - before any output is created

### Option 2 - manual download

[](#option-2---manual-download)

- Download, or clone this repo within your plugin
- Include the main class file before you declare your list table class
- Extend `leewillis77\WpListTableExportable\WpListTableExportable` instead of `WP_List_Table`
- Your plugin will need to also require bootstrap.php on any request that would result in the list table being shown *as early as practical* in the request lifecycle - before any output is created

Customising…
------------

[](#customising)

By default, the CSV file will strip any HTML tags from the cell contents, and decode HTML attributes before outputting the contents to the CSV file. Sometimes you may want an alternative representation of a cell. To do that you can implement a `column_csv_{column_id}` callback in your extending class. This will override the standard column\_{column\_id} callback when the data is being output to CSV - HTML layout will be unaffected and will use the original callback.

For example:

```
	// The original column callback. Used when generating the HTML list table.
	function column_cart_value( $item ) {
		return $this->currency() . ' ' . $this->get_cart_value();
	}

	// The callback for outputting to CSV. Used instead of the standard callback when
	// generating the CSV file only.
	function column_csv_cart_value( $item ) {
		return $this->get_cart_value();
	}
```

If you want to exclude a column from being output in the CSV, then you can return its ID from a hidden\_columns\_csv() method in your class. For example:

```
	protected function hidden_columns_csv() {
		return array(
			'excluded_column_id'
		);
	}
```

When…
-----

[](#when)

This isn't intended as a finished solution. It's extremely *icky* in places (The requirement for bootstrap.php is a prime example).

There are also several obvious feature improvements that could be made - particularly supporting outputting *all* pages, not just the current page and/or allowing a user to select which rows to export.

The class is lightly, manually tested with a simple List Table implementation - feedback on it's usefulness with more complex list tables [would be welcome](https://github.com/leewillis77/WpListTableExportable/issues).

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance55

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

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 ~331 days

Recently: every ~139 days

Total

11

Last Release

286d ago

Major Versions

v0.3.4 → v1.0.02024-01-26

v1.0.1 → v2.0.02024-01-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/e92b9ea36de63e6ba4b14eb2a2f95f8d6e130b96b6f2552e771fc5b06967f858?d=identicon)[leewillis77](/maintainers/leewillis77)

---

Top Contributors

[![leewillis77](https://avatars.githubusercontent.com/u/1097338?v=4)](https://github.com/leewillis77 "leewillis77 (47 commits)")

### Embed Badge

![Health badge](/badges/leewillis77-wplisttableexportable/health.svg)

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

###  Alternatives

[andrefigueira/blog-article-faker

Generate random blog article titles and content (including markdown) using faker

1415.0k](/packages/andrefigueira-blog-article-faker)

PHPackages © 2026

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