Skip to content
+1-888-319-3663

COMMUNITY FORUM

Preserve SQL Column Names in Export to Excel

Sherry Whitten asked 4 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.
Answers
Patrick Roth Staff answered 4 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:
http://www.eonesolutions.com/blog-post/tech-tuesday/tech-tuesday-changing-column-names-excel-file-destination/
 
Sherry Whitten replied 4 years ago

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

Sherry Whitten replied 4 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.