# Export table to CSV (display data)

**URL:** <https://forum.inductiveautomation.com/t/export-table-to-csv-display-data/46660>\
**Category:** Ignition\
**Tags:** ignition80, database, ignition81, perspective, scripting\
**Created:** [May 13, 2021, 7:07am UTC](https://forum.inductiveautomation.com/t/export-table-to-csv-display-data/46660 "2021-05-13T07:07:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrii.Randiuk](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@Andrii.Randiuk](https://forum.inductiveautomation.com/u/Andrii.Randiuk)\
**Post date:** [May 13, 2021, 7:07am UTC](https://forum.inductiveautomation.com/t/export-table-to-csv-display-data/46660/1 "2021-05-13T07:07:15Z")

</div>

Hello people) I have questions about export table to CSV file! I want export to CSV file table which i filtered or not filtered with headers and column which visible. How I can do it, please can someone help me? And how I can export date in right format the same as like in pictures?  
Original table have 17 column but I display only 7 column, I export only displayed column)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/9/790e95f0abe8ceeb0c3b2ff0adfab839ac8c1bf4.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/6/560ce761fbf950f5e0695cd030c8006b4e27a419.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/4/842f336eed7d11c3a68e15820f3632564429352a.png)

---

<div class="post-metadata">

**Author:** ![Benito\_Anton\_Recio](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@Benito\_Anton\_Recio](https://forum.inductiveautomation.com/u/Benito_Anton_Recio)\
**Post date:** [November 20, 2023, 1:38pm UTC](https://forum.inductiveautomation.com/t/export-table-to-csv-display-data/46660/2 "2023-11-20T13:38:55Z")

</div>

I had just the same question.  
In my case I have a table with start and finish filters, and later a button for exporting displayed data from table to csv, but this script doesn't create any file and an error appears.

Any help, please.  
Thanks

 ![FromTableToScript_Script](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5f2215e010a5aa2c02ed9e59b59ee18ce0427953.jpeg)  
 ![FromTableToScript_Error](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/24f70a495aa5464cf988836f2a4bb560a6f8f16e.jpeg)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 20, 2023, 2:13pm UTC](https://forum.inductiveautomation.com/t/export-table-to-csv-display-data/46660/3 "2023-11-20T14:13:32Z")

</div>

Looks like you have copied and pasted a script that is made for Vision. Definitely won't work like that in Perspective.

There are numerous topics here that discuss this task for Perspective:

[https://forum.inductiveautomation.com/search?q=perspective%20table%20download%20csv](https://forum.inductiveautomation.com/search?q=perspective%20table%20download%20csv)

---

<div class="post-metadata">

**Author:** ![Benito\_Anton\_Recio](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@Benito\_Anton\_Recio](https://forum.inductiveautomation.com/u/Benito_Anton_Recio)\
**Post date:** [November 21, 2023, 10:17am UTC](https://forum.inductiveautomation.com/t/export-table-to-csv-display-data/46660/4 "2023-11-21T10:17:37Z")

</div>

You're right!

I'm starting with scripting and I forgot there are scripting system functions for vision and perspective (both), but there are others scripting functions especifically for Vision (eg. event.source.parent.getcomponent) or specifically for Perspective (self.getSiblings).  
In any way, I got it and I paste here how to do it in Perspective

 ![PerspectiveTableToCSV](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4d452610f2411d515af912de7df796157a9fc2dc.jpeg)  
.

Thanks,  
Benito

---

<div class="post-metadata">

**Author:** ![Johann\_Simetsberger](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@Johann\_Simetsberger](https://forum.inductiveautomation.com/u/Johann_Simetsberger)\
**Post date:** [January 16, 2024, 8:58am UTC](https://forum.inductiveautomation.com/t/export-table-to-csv-display-data/46660/5 "2024-01-16T08:58:11Z")

</div>

Hello, does the data output from the filtered table work for you? I have tried the same thing but I always get all the data from the table.
