# Table exports result in html instead of CSV

**URL:** <https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020>\
**Category:** Help me!\
**Created:** [March 5, 2021, 6:42am UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020 "2021-03-05T06:42:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DillonParfitt](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@DillonParfitt](https://community.forestadmin.com/u/DillonParfitt)\
**Post date:** [March 5, 2021, 6:42am UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020/1 "2021-03-05T06:42:22Z")

</div>

We go to a table and click the export table built in action. This results in a success response and a downloaded csv file with no table data but rather html code.

Here is a snippet of the code that is downloaded:

```javascript
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<meta property="og:logo" content="/logo.png" />

		<title></title>

		<meta
			name="client/config/environment"
			content="some long string"
		/>

		<link
			rel="stylesheet"
			href="/assets/vendor-.css"
			integrity="some long string"
		/>
		<link
			rel="stylesheet"
			href="/assets/client-.css"
			integrity="some long string"
		/>
		<link rel="icon" id="favicon" type="image/x-icon" href="data:," />
	</head>
	<body class="l-application">
		<script
			src="/assets/vendor-.js"
			integrity="some long string"
		></script>
		<script
			src="/assets/client-.js"
			integrity="some long string"
		></script>

		<script type="text/javascript">
			!(function () {
				var analytics = (window.analytics = window.analytics || []);
				if (!analytics.initialize)
					if (analytics.invoked)
						window.console && console.error && console.error('Segment snippet included twice.');
					else {
						analytics.invoked = !0;
						analytics.methods = [
							'trackSubmit',
							'trackClick',
							'trackLink',
							'trackForm',
							'pageview',
							'identify',
							'reset',
							'group',
							'track',
							'ready',
							'alias',
							'debug',
							'page',
							'user',
							'once',
							'off',
							'on',
						];
						analytics.factory = function (t) {
							return function () {
								var e = Array.prototype.slice.call(arguments);
								e.unshift(t);
								analytics.push(e);
								return analytics;
							};
						};
						for (var t = 0; t < analytics.methods.length; t++) {
							var e = analytics.methods[t];
							analytics[e] = analytics.factory(e);
						}
						analytics.load = function (t, e) {
							var n = document.createElement('script');
							n.type = 'text/javascript';
							n.async = !0;
							n.src = 'https://cdn.segment.com/analytics.js/v1/' + t + '/analytics.min.js';
							var a = document.getElementsByTagName('script')[0];
							a.parentNode.insertBefore(n, a);
							analytics._loadOptions = e;
						};
						analytics.SNIPPET_VERSION = '4.1.0';
						analytics.load('some string');
					}
			})();
		</script>
	</body>
</html>

```

## Context

Please provide any relevant information about your setup.

- Package Version: 6.7.6
- Express Version: 4.17.1
- Sequelize Version: 6.5.0
- Database Dialect: PostgreSQL
- Database Version: 12.4

---

<div class="post-metadata">

**Author:** ![lrousseau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/lrousseau/32/1712_2.png) [@lrousseau](https://community.forestadmin.com/u/lrousseau)\
**Post date:** [March 5, 2021, 9:13am UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020/2 "2021-03-05T09:13:33Z")

</div>

We encounter the same issue with our forest admin.

Here is the setup :

- Liana Version: 6.6.3
- Express Version: 4.16.4
- Sequelize Version: 6.6.3
- Database Dialect: PostgreSQL

Edit : The issue is not browser dependant.

Edit (bis): I found a workaround. The issue is happening only when I am in custom views. If I use the default table view with filters I can export the data I need as CSV

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [March 5, 2021, 11:01am UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020/3 "2021-03-05T11:01:43Z")

</div>

Hi @lrousseau, @DillonParfitt 👋 welcome to our community.  
What do you mean by `custom views`?  
Have you got any errors logs on your backend or the frontend?  
Can you give me a screen of the network tab please 🙏.

---

<div class="post-metadata">

**Author:** ![DillonParfitt](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@DillonParfitt](https://community.forestadmin.com/u/DillonParfitt)\
**Post date:** [March 5, 2021, 11:22am UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020/4 "2021-03-05T11:22:14Z")

</div>

Hi @Arnaud_Moncel

Please find attached the screenshot for the network tab I have blacked out some sensitive information if you need any of that please let me know.

 ![Screenshot 2021-03-05 at 13.15.54](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/1/1d8cf10abc28110e0e1064b882f905ac3cd7cdf0.png) ![Screenshot 2021-03-05 at 13.16.39](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b2bcff0c2fc240a7c9253f124bce7a6132650fca.png) ![Screenshot 2021-03-05 at 13.16.44](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b1233d675a547fe0726c01c632e655a98549fd39.png)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [March 5, 2021, 1:36pm UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020/5 "2021-03-05T13:36:34Z")

</div>

The url is pretty strange 🤔. How do you call the export action?  
Can you give me a process to try to reproduce your issue?

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [March 5, 2021, 2:15pm UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020/7 "2021-03-05T14:15:42Z")

</div>

Thanks i’m able to reproduce! I will create a bug report and transfert it to the tech team.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Moncel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/arnaud_moncel/32/24_2.png) [@Arnaud\_Moncel](https://community.forestadmin.com/u/Arnaud_Moncel)\
**Post date:** [March 5, 2021, 4:29pm UTC](https://community.forestadmin.com/t/table-exports-result-in-html-instead-of-csv/2020/9 "2021-03-05T16:29:17Z")

</div>

The fix was released, can you let me know if the issue is fixed now.
