Solved!
mega thanks to Youri with his snippets to get at the column names in a table and his super cool idea to have buttons that can quickly change the set of visible columns: https://community.skuid.com/t/snippet-to-show-hide-set-of-column-in-table
var params = arguments[0], $ = skuid.$; var model = skuid.$M('ListingTransplant'); var fields = []; var columnsArray = []; var settings = params.component._personalizationService.getSettings(); var columns = settings.columnSettingsByUID; //put each column into an array that can be sorted $.each (columns, function(i,column){ columnsArray.push(column); }); columnsArray.sort(function(a,b) {return (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0);} ); //loop through the columns and push the field api name to the fields array $.each (columnsArray, function(i,column){ var field = column.fieldId; var hidden = column.userHidden; if (!!field && !hidden){ fields.push(field); } }); //the result gets populated in reverse order, this puts it right var fieldNames = fields.reverse(); //get the field objects from each field api name //note template fields are not included, and lookup fields seem to always return the Id not the Name var fieldsWithCorrectLabels = $.map(fieldNamess, function(v){ var actualField = model.getField(v); return { id: actualField.id, label: actualField.label }; }); model.exportData({ fields: fieldsWithCorrectLabels, doNotAppendRowIdColumn: true, useAPINamesForHeaders: false });<br />