Export from a table using snippet that uses table columns as export rows? Also only visible column

Thanks Jack,

Using the new code I still can’t seem to get it to output anything in the CSV.

Could it be because I haven’t saved any specific personalization settings on the table? In Youri’s original post it mentioned that if there were no saved personalization settings it could use the default with this:

params.component.element._columnSettingsByUID;

But I’m not sure how to get that working properly. Is there a way I can check if personalization settings are saved and if not, use the default, and if so, use those personalization settings?