Allows to add import/export to csv options to an adminforth table.
- Import records into AdminForth tables from CSV or Excel files.
- Export table data to CSV or Excel for external processing and reporting.
- Speed up bulk data operations in the admin panel.
- Support operational workflows around large datasets.
Full setup and configuration guide:
AdminForth ImportExport Documentation
To use the plugin for export only, disable import in the plugin configuration:
new ImportExport({
importEnabled: false,
})Import is enabled by default for backward compatibility. Disabling it removes the import action from the UI and does not register the import-related HTTP endpoints.
To import and export Excel workbooks instead of CSV files, set fileFormat for the resource:
new ImportExport({
fileFormat: 'xlsx',
})CSV remains the default file format. Both formats support exportViaUpload for large background exports. XLSX exports that exceed Excel's per-worksheet row limit are split across worksheets, and imports combine worksheets when their columns match.
By default every column except virtual and backendOnly ones is exported. Pass an exact, ordered list to choose what the file holds — virtual columns included, filled by the export hook:
new ImportExport({
columnsToExport: ['id', 'model', 'price', 'owner_email'], // owner_email is virtual
hooks: {
export: {
beforeWrite: async ({ records }) => {
records.forEach((record) => { record.owner_email = /* ... */ ''; });
},
},
},
})hooks.export.beforeWrite runs right before records are serialized, in both classical and upload export, and can transform values, fill virtual columns, drop records, or abort the export by returning { ok: false, error }.
AdminForth is an open-source, agent-first admin framework for building robust admin panels and back-office applications faster.