Strapi plugin logo for strapi-plugin-csv-exporter

strapi-plugin-csv-exporter

A highly configurable Strapi plugin that allows you to export your content types as CSV files with drag-and-drop interface for column management.

Strapi Plugin CSV Exporter

A highly configurable Strapi plugin that allows you to export your content types as CSV files with drag-and-drop interface for column management.

Plugin Version Strapi Version License

✨ Features

  • Easy CSV Export: Export your Strapi collections to CSV format
  • Interactive Table Preview: View your data before export in the Admin Panel
  • Flexible Configuration: Configure which content types, collumns & relations are available for export
  • Drag & Drop Column Reordering: Reorder columns for both table display and CSV output in the Admin Panel
  • i18n Support: Export your content types based on your configured locales
  • Permission Management: Select which users can use the plugin with a specific permission
  • Custom Filtering: Apply optional filters as you would do with Strapi Document API
  • TypeScript Support: Write the configuration file in TypeScript for better type safety
Strapi Plugin CSV Exporter screenshot

📦 Installation

Minimum Strapi Version needed: v5

npm install strapi-plugin-csv-exporter

🚀 Quick Start

  1. Install the plugin

  2. Enable the plugin in your config/plugins.ts:

1module.exports = {
2  'csv-exporter': {
3    enabled: true,
4  },
5};
  1. Create config/csv-exporter.ts in your Strapi project:
1import type { CSVExporterPlugin } from "strapi-plugin-csv-exporter/dist/server/src";
2
3module.exports = (): CSVExporterPlugin => ({
4  // Content type specific configurations
5  config: {
6    // Configuration for articles content type
7    'api::article.article': {
8      // Label shown in the dropdown
9      dropdownLabel: 'Published articles',
10
11      // Columns to export
12      columns: ['title', 'createdAt'],
13
14      // Optional relations as column
15      relation: {
16        author: {
17          column: ['name'],
18        }
19      },
20
21      // Optional filters to apply to the query
22      filter: {
23        publishedAt: {
24          $ne: null,
25        },
26      },
27
28      // Custom columns to add to the table
29      customColumns: {
30        'customColumnName': { // This will be used as collumn title
31          // item contains the element containing all columns and relations to build a custom column
32          column: (item) => `custom string result with id: ${item.id}`
33        }
34      }
35
36    },
37
38  // Optional: Global date formatting for all fields that are a valid ISO Date
39  dateFormat: 'dd/MM/yyyy HH:mm', // default
40  // Optional: Set a *global* IANA time zone identifier or UTC offset (e.g. 'Europe/Berlin' or '+02:00'). Per default, the current timezone of the client will be used to format timestamps. If no timezone can be determined, default will be UTC+00:00)
41  timeZone: '+00:00', // default
42  // Optional: Fields to globally ignore in exports
43  ignore: [], // default
44};
  1. Build and restart your Strapi application

  2. Add Permission Enable your users to use the plugin in the permissions settings

🖥️ Usage

Accessing the Plugin

  1. Log into your Strapi admin panel
  2. Enable the plugin for your users in the permissions settings
  3. Navigate to CSV Exporter in your side bar panel
  4. The plugin interface will load with your configured content types in the dropdown

Using the Interface

1. Select Content Type

  • Use the dropdown to select which content type to export
  • Only configured content types will appear in the list
  • The table shows a preview of your data

2. Manage Columns

Reorder Columns:

  • Drag and drop column items to reorder them
  • The table and CSV export will use this new order

Delete Columns:

  • Click the ❌ button on any column to remove it
  • Deleted columns won't appear in the table or CSV export

3. Download CSV

  • Click the "Download" button to generate and download your CSV
  • Format: {content-type}-export-{dd_MM_yyyy_HH_mm}.csv

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


⭐ If this plugin helped you, please consider giving it a star on GitHub! ⭐

Install now

npm install strapi-plugin-csv-exporter

STATS

No GitHub star yet18 weekly downloads

Last updated

52 days ago

Strapi Version

5.0.0 and above

Author

github profile image for breezertwo
breezertwo

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.