Hi,
The function system.dataset.exportExcel doesn’t work in perspective (in a script button).
Error message below :
Do you have a solution ?
Thanks,
As in this thread:
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
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(…
Use system.dataset.toExcel to transform your dataset into a byte array. Then pass that to system.perspective.download to trigger a download request on the local browser.