Part of the Views ecosystem · 288 projects
Views Data Export lets visitors download a View as a spreadsheet. For Excel (.xlsx) files it builds the whole spreadsheet in memory with PhpSpreadsheet. In batch mode it re-opens and re-saves the file on every batch, so large exports can take minutes or run out of memory. Views Data Export: Fast XLSX streams the same export row by row with the OpenSpout library. You switch it on per export display, with no other changes to your View, and the file downloads directly with a progress bar.
Example from a production site: an export of 55,000 rows went from about 270 seconds (Views Data Export batch) to about 8 seconds. An export of 350,000 rows finished in under a minute.
Features
- One checkbox per display. A "Fast XLSX export" setting is added to every Views Data Export display. Displays where it is off keep working exactly as before.
- Same View, same results. Views still builds the query, so filters, exposed filters, contextual filters, relationships, sorting, pager and export limit all apply. The URL, access rules and the export link on the page do not change.
- Same output. Columns, labels and order come from the display's fields. The usual Views processing runs too (entity loading,
hook_views_post_execute(),hook_views_pre_render(), field pre-render), so modules that change results keep working. The Views Data Export "Alias" and "Raw output" field options are respected. - Fast where possible, correct everywhere. Common fields (numbers, dates, plain text, single-value text fields, simple
{{ field }}rewrites) are formatted straight from the database using the same rules as Views. Any other field (links, formatters, Twig rewrites, custom field plugins) is rendered by Views as before. Fields whose plugin class has been replaced or extended fall back to Views rendering automatically. - Better spreadsheets. Numbers are real Excel numbers with the configured decimals and thousands separator, so they can be summed and sorted. The header row is bold, and sheets are right-to-left for RTL languages.
- Progress bar. Clicking the export link shows a dialog ("Exported 12,000 of 55,033 rows") that the user can cancel. The dialog is isolated from theme CSS, so it looks the same under any theme. Without JavaScript the link still downloads the file directly.
- Safe limits. Exports that are missing required filters, or that have more rows than your limit (Excel's limit by default), send the user back to the page with a clear message instead of an error or an empty file.
- Low memory. Very large exports can be processed in chunks.
Use it when visitors download large lists (transactions, orders, logs, reports) as Excel, and the Views Data Export batch is too slow or the standard export runs out of memory.
Post-Installation
- Install the module with Composer, which also installs OpenSpout:
composer require drupal/views_data_export_openspout. Then enable it. - Edit a View that has a Data export display and select that display.
- Under Format, click Fast XLSX export: Off and check Stream this export to .xlsx with OpenSpout.
- Optional settings:
- Maximum rows: larger exports are refused with a message.
- Process rows in chunks of: leave at 0 to process all rows at once, exactly like Views. Set it, for example to 5000, for very large exports to keep memory low. In chunk mode, result hooks see one chunk at a time, so don't use it if a module needs the whole result (totals, re-sorting).
- Save the View. The export link now downloads the .xlsx directly, with a progress bar.
Notes:
- The output is always a single-sheet .xlsx, whatever formats the display's style lists.
- The file name comes from the display's Filename setting (tokens supported). Characters that Windows does not allow in file names are replaced.
- The export runs in a single request, so very large exports are limited by PHP's
max_execution_time. - Custom export links (not rendered by Views Data Export) can use the progress bar too: add the
data-openspout-exportattribute and attach theviews_data_export_openspout/progresslibrary.
Additional Requirements
- Drupal 10.3 or later, or Drupal 11.
- PHP 8.3 or later (required by OpenSpout 4).
- Views Data Export.
- The OpenSpout library (
openspout/openspout^4), installed by Composer.
Recommended modules/libraries
- XLS Serialization: you need it to create xlsx Data export displays in Views Data Export in the first place. This module then replaces its output on the displays you enable.
Similar projects
- Views Data Export with XLS Serialization: builds .xlsx with PhpSpreadsheet, which is slow and memory-heavy for large exports. This module plugs into it and keeps its displays, links and settings.
- Views Data Export PHPSpreadsheet: also uses PhpSpreadsheet, with the same performance limits.
- Views Streaming Data: streams large Views results, but only as CSV or JSON, not Excel.
Supporting this Module
Bug reports, patches and merge requests in the issue queue are the best way to help.
Community Documentation
See the README.md included with the module.
Ask your assistant about Views Data Export Openspout
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Views ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0-alpha2 | Pre-release | 11 | PHP >=8.3 | Nov 25, 2026 | |
| 1.0.0-alpha1 | Pre-release | 10–11 | PHP >=8.3 | Nov 25, 2026 |