# Exporting data into HTML table

**URL:** <https://discuss.elastic.co/t/exporting-data-into-html-table/288485>\
**Category:** Elasticsearch\
**Created:** [November 5, 2021, 10:30am UTC](https://discuss.elastic.co/t/exporting-data-into-html-table/288485 "2021-11-05T10:30:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlessandroKP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alessandrokp/32/45312_2.png) [@AlessandroKP](https://discuss.elastic.co/u/AlessandroKP)\
**Post date:** [November 5, 2021, 10:30am UTC](https://discuss.elastic.co/t/exporting-data-into-html-table/288485/1 "2021-11-05T10:30:02Z")

</div>

Hello,

I am looking for a tool that lets you export data stored in Elasticsearch on a file in **HTML format**.

I know that you can use Kibana to export the content of an index (or a subset) into **CSV** format.  
Do you know if there is a tool I can use to export data directly into a **HTML table** from ES?  
I do not want take the CSV produced by Kibana and transform it into a HTML table.

Let me give you an example.

Suppose I have the following data in an Elasticsearch index (just showing the original JSON):

```auto
[
	{
		"@timestamp": "2021-11-05T00:00:00.000Z",
		"user_name": "alessandro",
		"user_email": "alessandro@gmail.com",
		"message": "hello world",
		"status": "OK"
	},
	{
		"@timestamp": "2021-11-05T01:00:00.000Z",
		"user_name": "mario",
		"user_email": "mario@gmail.com",
		"message": "this is a test message",
		"status": "KO"
	},
	{
		"@timestamp": "2021-11-05T02:00:00.000Z",
		"user_name": "giuseppe",
		"user_email": "giuseppe@hotmail.com",
		"message": "lorem ipsum dolor sit amet",
		"status": "KO"
	}
]

```

If I exported it into CSV by using Kibana I would get something like this:

```auto
@timestamp,user_name,user_email,message,status
2021-11-05T00:00:00.000Z,alessandro,alessandro@gmail.com,"hello world",OK
2021-11-05T01:00:00.000Z,mario,mario@gmail.com,"this is a test message",KO
2021-11-05T02:00:00.000Z,giuseppe,giuseppe@hotmail.com,"lorem ipsum dolor sit amet",KO

```

Now, I would like instead to export it into a HTML table, like the following:

```auto
<TABLE id="" cellSpacing="1" cellPadding="1" width="100%" border="1" >
	<TR>
		<TD>@timestamp</TD>
		<TD>user_name</TD>
		<TD>user_email</TD>
		<TD>message</TD>
		<TD>status</TD>
	</TR>
	<TR>
		<TD>2021-11-05T00:00:00.000Z</TD>
		<TD>alessandro</TD>
		<TD>alessandro@gmail.com</TD>
		<TD>hello world</TD>
		<TD>OK</TD>
	</TR>
	<TR>
		<TD>2021-11-05T01:00:00.000Z</TD>
		<TD>mario</TD>
		<TD>mario@gmail.com</TD>
		<TD>this is a test message</TD>
		<TD>KO</TD>
	</TR>
	<TR>
		<TD>2021-11-05T02:00:00.000Z</TD>
		<TD>giuseppe</TD>
		<TD>giuseppe@hotmail.com</TD>
		<TD>lorem ipsum dolor sit amet</TD>
		<TD>KO</TD>
	</TR>
</TABLE>

```

Do you know if there is a tool that lets you do this?

---

<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:** [December 3, 2021, 10:30am UTC](https://discuss.elastic.co/t/exporting-data-into-html-table/288485/2 "2021-12-03T10:30:48Z")

</div>

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