Skip to content


Preserve SQL Column Names in Export to Excel

Sherry Whitten asked 5 years ago
I have a map that queries a SQL view and returns columns like “DUE DATE:” and “CUSTOMER ID”.  When I run the query, and when I export to excel, it is dropping the spaces, resulting in a difficult-to-read “DUEDATE” and “CUSTOMERID”.  I don’t see any way to make this keep the SQL column names.  Please help.  Thanks.
Patrick Roth Staff answered 5 years ago
you can’t adjust the output column names for a map – they are always the same as the input names (and SC removes the spaces on source data).
but take a look at:
Sherry Whitten replied 5 years ago

Thank you Patrick. Two of us googled for answers, and neither of us found that one.

Sherry Whitten replied 5 years ago

I struggled to get this working. I discovered that the SQL script populates variable ‘globalfilePATH’ but the script to rename the columns is using ‘globalfileNAME’. The script bombs. I changed the SQL script to populate ‘globalfileNAME’ that the second script is looking for. It works perfectly now! Thanks again!

If you would like to submit an answer or comment, please sign in to the eOne portal.