Here’s a thread and post to an example project of downloading a CSV file [SOLVED] List with rows cannot be accessed by common JS syntax; '.data'
If you are still having trouble, create a new small project that shows the error that you getting and the logic you are trying to implement.