# \[Feature-13610\]Export to Excel in Perspective Ignition 8

**URL:** <https://forum.inductiveautomation.com/t/feature-13610-export-to-excel-in-perspective-ignition-8/24177>\
**Category:** Ignition Early Access\
**Tags:** scripting, ignition80\
**Created:** [April 16, 2019, 3:23pm UTC](https://forum.inductiveautomation.com/t/feature-13610-export-to-excel-in-perspective-ignition-8/24177 "2019-04-16T15:23:56Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![jd1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jd1/32/18928_2.png) [@jd1](https://forum.inductiveautomation.com/u/jd1)\
**Post date:** [March 15, 2021, 7:55pm UTC](https://forum.inductiveautomation.com/t/feature-13610-export-to-excel-in-perspective-ignition-8/24177/23 "2021-03-15T19:55:26Z")

</div>

Any chance you would be willing to share your script? I changed to .xlsx and now excel just tells me the file format is not valid. I feel like I must be missing something basic here.

This is my code

```auto
data = self.parent.parent.getChild("Table").props.data
	headers = data[0].keys()
	system.perspective.print(headers)
	
	datasetData = []
	for row in range(len(data)):	
		rowData = []
		for col in range(len(headers)):
			cell = data[row][headers[col]]
			if hasattr(cell, 'value'):
				rowData.append(cell.value)
			else:
				rowData.append(cell)
		#system.perspective.print(rowData)
		datasetData.append(rowData)
	
	#system.perspective.print(datasetData)	
	finalDataset = system.dataset.toDataSet(headers,datasetData)
	XLSFormat = system.dataset.dataSetToExcel(True,[finalDataset])
	system.perspective.download("test.xlsx",XLSFormat)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/feature-13610-export-to-excel-in-perspective-ignition-8/24177)._
