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

Hello @ceszamora,

I just had this same issue come up and here is what i came up with. this is a script i put on a button.

	value = self.parent.parent.getChild("Table").props.data
	headers = value[0].keys()
	datasetData = []
	for row in range(len(value)):	
		rowData = []
		for col in range(len(headers)):
			rowData.append(value[row][headers[col]])
		datasetData.append(rowData)
	finalDataset = system.dataset.toDataSet(headers,datasetData)
	XLSFormat = system.dataset.dataSetToExcel(True,[finalDataset])
	system.perspective.download("test.xls",XLSFormat)

You will need change the path to your table’s data prop and also the filename. I tested it on my system but i don’t have excel installed, i just have an excel file reader and it opened with no issues.

I found that i needed to convert json to a dataset in order to make my instance work.

Let me know if you find a better way.