# How to implement export functionality inside custom plugin

**URL:** <https://discuss.elastic.co/t/how-to-implement-export-functionality-inside-custom-plugin/308893>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [July 5, 2022, 10:14am UTC](https://discuss.elastic.co/t/how-to-implement-export-functionality-inside-custom-plugin/308893 "2022-07-05T10:14:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azhar\_Uddin1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azhar_uddin1/32/98900_2.png) [@Azhar\_Uddin1](https://discuss.elastic.co/u/Azhar_Uddin1)\
**Post date:** [July 5, 2022, 10:14am UTC](https://discuss.elastic.co/t/how-to-implement-export-functionality-inside-custom-plugin/308893/1 "2022-07-05T10:14:35Z")

</div>

how can I `export data` which I rendered in a `dataGrid` inside of a custom `plugin` using `data plugin`

- How did I render the `data` inside a `plugin`?  
follow -\> [Git app.tsx](https://github.com/AzharUddinSheikh/testing/blob/PaginatedData/public/components/app.tsx)

 ![pluginData](https://us1.discourse-cdn.com/elastic/original/3X/6/5/65f462a9e80053146a4afe1e8d59a6a20a8f4a61.png)

I want to `export` this `data` using the `kibana plugin`  
`Dashboard plugin` has an example for exporting `data`

 ![dashboardExport](https://us1.discourse-cdn.com/elastic/original/3X/2/7/27a2ddb22a85ba4fba7c14f48dc05893eba5bbb5.png)

I need to add simple `button` **Export** inside custom `plugin` for `exporting data`

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [July 5, 2022, 4:44pm UTC](https://discuss.elastic.co/t/how-to-implement-export-functionality-inside-custom-plugin/308893/2 "2022-07-05T16:44:00Z")

</div>

Hello,

This should be possible. These are our plugin docs - [External plugin development | Kibana Guide [8.3] | Elastic](https://www.elastic.co/guide/en/kibana/current/external-plugin-development.html)

Here are some examples - [List of Kibana plugins | Kibana Guide [8.3] | Elastic](https://www.elastic.co/guide/en/kibana/current/plugin-list.html) you should be able to check out some code.

cc @devon.thomson

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![Azhar\_Uddin1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azhar_uddin1/32/98900_2.png) [@Azhar\_Uddin1](https://discuss.elastic.co/u/Azhar_Uddin1)\
**Post date:** [July 6, 2022, 6:54am UTC](https://discuss.elastic.co/t/how-to-implement-export-functionality-inside-custom-plugin/308893/3 "2022-07-06T06:54:58Z")

</div>

thanks, @bhavyarm for responding  
there's a `plugin` called **[Reporting Integration](https://github.com/elastic/kibana/tree/7.12/x-pack/plugins/reporting)** to Demonstrate how to put an Export button on a page and generate reports.

but the example is not enough to get it done _No such button for exporting CSV_ even if I am generate **PDF** it throws `Forbidden` Error

 ![reportingExample](https://us1.discourse-cdn.com/elastic/original/3X/2/6/2628db5972462b08140917e5aaa490b2680538e8.png)

---

<div class="post-metadata">

**Author:** ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)\
**Post date:** [July 7, 2022, 2:26pm UTC](https://discuss.elastic.co/t/how-to-implement-export-functionality-inside-custom-plugin/308893/4 "2022-07-07T14:26:03Z")

</div>

Hi @Azhar_Uddin1! The Export CSV action you're seeing is actually built-in to the table. In this case it's a Discover saved search panel, but it also works great when using Lens tables.

What I would do is look into the Embedding examples, and embed one of those tables into your custom plugin, using the `<EmbeddableRenderer /> ` react component. Let me know if you have any questions!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 4, 2022, 2:26pm UTC](https://discuss.elastic.co/t/how-to-implement-export-functionality-inside-custom-plugin/308893/5 "2022-08-04T14:26:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
