LogoLogo
Join our community
  • AdminJS
  • Contribute
  • Demo
  • Addons Marketplace
  • Installation
    • Getting started
    • Plugins
      • Adonis
      • Express
      • Nest
      • Fastify
      • Hapi
      • Koa
      • Community Plugins
        • FeathersJS
        • AdonisJS
      • Matrix
    • Adapters
      • TypeORM
      • Sequelize
      • Prisma
      • MikroORM
      • Objection
      • SQL
      • Mongoose
      • Community Adapters
        • AdonisJS
    • What's new in v7?
    • Migration Guide v7
  • Basics
    • Resource
    • Action
    • Property
    • Features
      • Relations
      • Upload
      • Logger
      • Import & Export
      • Password
      • Leaflet Maps
      • Writing your own features
    • API
      • List
      • New
      • Search
      • Show
      • Edit
      • Delete
      • Bulk Delete
    • Themes
    • Authentication
      • FirebaseAuthProvider
      • MatrixAuthProvider
  • How to write an addon?
  • UI Customization
    • Writing your own Components
    • Overwriting CSS styles
    • Dashboard customization
    • Changing the form view
    • Storybook
  • Tutorials
    • Role-Based Access Control
    • Internationalization (i18n)
    • Content Management System
    • Custom components library
    • Custom component internationalization
  • FAQ
    • PDF Generator
    • Charts
    • Forgot Password
  • ⚠️Legacy documentation
Powered by GitBook
On this page
  1. Basics
  2. Features

Import & Export

@adminjs/import-export

AdminJS offers a feature called "@adminjs/import-export" which solves this use case. You can utilize csv , json or xml files

To install add the package to your project.

$ yarn add @adminjs/import-export

Then add one line (features) to resource entry in AdminJS config.

import importExportFeature from '@adminjs/import-export';

import componentLoader from './component-loader.js';
...

{
  resource: Entity,
  features: [
    importExportFeature({ componentLoader }),
  ],
}

After that you should see two buttons (Import, Export) in the right top corner of the resource view)

Please remember that field names in imported files should be the same as in database model.

PreviousLoggerNextPassword

Last updated 2 years ago