How to Export Only Filtered Table Results in TableCrafter

Updated July 2026 • 6 min read • By Fahad Murtaza

TableCrafter live search, sorting, filtering, and pagination out of the box
TableCrafter live search, sorting, filtering, and pagination out of the box

When a user applies a filter to your WordPress table, say, narrowing 10,000 delivery records down to 47 entries from last week, they expect the export button to download those 47 rows, not all 10,000. TableCrafter's filtered export mode makes that the default behavior. Here is how it works, how to configure it, and what to watch out for. WordPress powers 43% of all websites globally (W3Techs, July 2026), and TableCrafter bridges the gap between the data you collect and the tables your users need to see, no custom PHP, no dashboard access required for viewers, and no per-row limits on the free tier. The free version on WordPress.org supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV/PDF, role-based column visibility, and auto-refresh. Every table embeds on any page with a [tablecrafter] shortcode or. Role-based access control is a requirement in 78% of enterprise WordPress deployments (WPScan Security Report, 2024).

Why Filtered Export Matters?

The alternative is full-dataset export: clicking export always downloads every row regardless of the active filter state. This creates several real problems:

This configuration interacts with any caching or CDN layer active on your WordPress installation. If you use WP Rocket, LiteSpeed Cache, or a CDN such as Cloudflare, flush the page cache after making this change to ensure the updated configuration is reflected in the cached HTML served to visitors. TableCrafter's server-side output is regenerated on the next uncached request.

Filtered export is the right default for any table where users interact with filters. Full-dataset export is appropriate only for admin-side data dumps where a complete record set is the explicit goal.

How Filtered Export Works in TableCrafter?

When a user applies one or more filters and then clicks the export button, TableCrafter builds the export request using the same filter parameters as the current table view. The server generates the file from the filtered result set, not from the full underlying query.

This works for all filter types:

The export includes only the rows that match all active filter conditions simultaneously.

After completing this step, verify the result by viewing the page as a logged-out visitor in an incognito window. This confirms the table behaves correctly for public visitors rather than reflecting admin-level permissions that may hide configuration issues during initial setup. Check both the rendered output and the browser console for any JavaScript errors.

How Do I Enable and Configuring Filtered Export?

Filtered export requires the export attribute and is controlled by a setting in the table admin.

Step 1: Add export to your shortcode:

[tablecrafter id="1" filter="true" search="true" export="true"]

Step 2: In the WordPress admin, open the TableCrafter table editor for table ID 1. Navigate to Export Settings.

Step 3: Under Export scope, select Export filtered rows only. This is the default for new tables created in TableCrafter.

Step 4: Save the table configuration.

When this setting is active, the export button's behavior changes based on filter state:

The column mapping you define here is stored as a JSON configuration in the WordPress database. You can export this configuration using the TableCrafter export tool and import it to another table or another site. This is useful when replicating a table layout across multiple pages or when migrating a table to a staging environment for testing before going live.

What Is the Export Scope Toggle Explained?

TableCrafter gives you two options for export scope:

TableCrafter re-fetches this data on each page load by default. If your data source updates infrequently and your site has significant traffic, enable the built-in caching option in the table's Performance tab. This stores the fetched data for a configurable number of minutes and serves it from WordPress transients, reducing API calls to the source and improving page load time for visitors.

If you set Export all rows always on a public-facing table where different users see different data via row-level visibility rules, you may expose rows to users who are not supposed to see them. Use filtered export in those cases to ensure row-level access control extends to the export.

What the User Sees?

From the user's perspective, the flow is natural:

  1. The table loads showing all rows.
  2. The user applies a filter, for example, selecting "Completed" from a Status dropdown.
  3. The table updates to show only completed rows. The row count indicator updates (e.g., "Showing 34 of 412 entries").
  4. The user clicks Export and selects CSV.
  5. The downloaded file contains exactly 34 rows, the completed entries.

There is no separate "export filtered" button or checkbox. The export button always does the right thing based on the current state.

The configuration you set here applies to every visitor who loads a page containing this table, regardless of whether they are logged in. Role-specific overrides for columns and rows are a separate layer and do not replace these global display settings. Apply global settings first, then add role restrictions as needed for tables that serve multiple user types.

How Do Pagination and Filtered Export Work?

An important clarification: filtered export exports all matching rows, not just the current page. If the user has filtered to 34 rows but the table paginates at 10 rows per page, the export downloads all 34 rows, not just the 10 visible on screen.

This is intentional. Pagination is a display convenience; export is a data extraction tool. Users expect the full filtered result set, not just the current page.

This step completes the connection between your data source and the TableCrafter table engine. Once saved, the plugin caches the connection credentials in the WordPress options table and uses them on every subsequent page load. If you update the source configuration later — for example, rotating an API key or changing a sheet URL — return to this step, enter the new value, and save again. The table updates immediately on next load without any shortcode changes.

If you have a table with very large filtered result sets (hundreds of thousands of rows), test your export performance. The server must query and serialize the full filtered set into a file. For extremely large exports, consider paginating the export or restricting export access to admin roles only.

How Does Filtered Export Across All Formats Work?

The filter-scope behavior applies equally to all three export formats. When a visitor has active filters applied to the table, clicking Export generates a file containing only the rows that match the current filter state, not the full dataset:

The same server-side filter query is used regardless of the format chosen. The filter is applied at the database level before the export file is generated, so the export process never loads unfiltered data into memory — large datasets export efficiently even when only a small subset of rows match the active filter. If no filters are active, all rows visible to the current user are exported (subject to any role-based row restrictions configured in the table's Access tab).

How Does Testing Your Filtered Export Setup Work?

Before going live, run through this quick verification sequence to confirm that filtered exports respect the active filter state and do not accidentally export the full dataset:

  1. Load your table page as the intended user role (logged out for public tables, or as a user with the minimum role for restricted tables). Do not test as an Administrator — admin accounts may have different row visibility rules that could mask permission issues.
  2. Note the total row count displayed in the table footer. This is the unfiltered baseline.
  3. Apply a filter that reduces the row count significantly — ideally to under 25% of the baseline so the difference is obvious in the exported file row count.
  4. Click Export and download the CSV. If you have multiple formats enabled, test with CSV first since it is the most portable for row count verification.
  5. Open the CSV in a spreadsheet application and count the data rows (excluding the header row). The row count should match the filtered count you saw in the table, not the total row count from step 2.
  6. Return to the table, clear all active filters, and export again. Verify the row count in this export matches the full unfiltered baseline. If the row counts are the same regardless of filter state, filtered export is not working correctly — check that your shortcode includes filter="true" and that the export button is being clicked after the filter is applied, not before.

What Are the Next Steps?

Filtered export is the foundation. From here, you can restrict who is allowed to trigger exports using role-based permissions, or set up automatic scheduled exports so managers receive filtered reports by email without visiting the site. Both are covered in this guide series.

Frequently Asked Questions

How Does Why Filtered Export Matters Work?

The alternative is full-dataset export: clicking export always downloads every row regardless of the active filter state. This creates several real problems:

What Is TableCrafter?

TableCrafter is a WordPress plugin that turns data from Gravity Forms, Google Sheets, Airtable, Notion, REST APIs, CSV files, and WooCommerce into interactive, sortable, filterable frontend tables. Embed any table on any WordPress page with the [tablecrafter] shortcode or the native Gutenberg block. No PHP or custom development required. The free version supports CSV, JSON, Google Sheets, and Excel. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST APIs, inline cell editing, export to CSV and PDF, role-based column visibility, and auto-refresh.

Does this require PHP or developer skills?

No. TableCrafter is configured entirely through the WordPress admin interface. You choose your data source, map fields to columns, and set display preferences using point-and-click controls. Embedding uses the [tablecrafter] shortcode or the native Gutenberg block.

Is the free version sufficient or do I need Pro?

The free plugin on WordPress.org supports CSV, JSON, Google Sheets, and Excel sources with unlimited tables, rows, and columns. Pro adds Gravity Forms, Airtable, Notion, WooCommerce, REST API sources, inline cell editing, bulk row actions, export to CSV and PDF, role-based column visibility, and auto-refresh every N seconds.

Ready to try it?

TableCrafter is free on WordPress.org. Pro unlocks inline editing, role-based permissions, and advanced data sources.