Object has no attribute 'exportCSV'

I have a button with actionPerformed script to export table data to CSV file

table = event.source.parent.getComponent('Table').data.exportCSV("data.csv", 1)

i got below error

AttributeError: 'com.inductiveautomation.factorypmi.application.bin' object has no attribute 'exportCSV'


what’s my mistake .
Thanks,

1 Like

The BasicDataset class doesn’t have an ‘exportCSV’ method. Try this instead.

data = event.source.parent.getComponent('Table').data
system.dataset.exportCSV("data.csv", 1, data)
4 Likes

Thanks a lot Schenk .
Working fine as per your advise:slight_smile:

1 Like