It’s possible this plugin is not ported to Strapi v4, in which case it won’t work for you. Here’s an idea for how to implement this, though. I assume you just need to output some data in CSV format, rather than actual XLS.
- Implement a custom route and controller for exporting data. This can be a general route or it can live under a specific content-type if you’re just trying to export that specific content-type (e.g either
/api/exportor/api/restaurants/export). - In the controller, get your data. This can be done in a number of ways, either calling the
findcontroller/service or using the entityService. - Once you have the data, simply set it in your
ctx.bodyin CSV format.