Interview Question in Data Transformation Services (DTS)


 

Interview Question :: Exporting from SQL to Excel puts a ; at the beginning of each Column header


I am pretty good at SQL (using 2000) but am having trouble automating an export to excel. I have a tbl and want to export the whole thing to an excel spreadsheet. I set up a dts pkg to do this, but each column is being prefaced with a ' at the beginning. So I have columns called 'SalesRep and 'Month. I need to get the ' out of the name, but I have not been able to. I thought it was not a huge deal b/c I had to open each one to check them each month, and I could do a replace all of ', but excel does not even see it. I did not see anything in a quick search of the internet. Any one see this before, know how to fix???
Answers to "Exporting from SQL to Excel puts a ; at the beginning of each Column header"
RE: Exporting from SQL to Excel puts a ; at the beginning of each Column header?

This sounds correct to me. Without the ' at the beginning of a cell Excel might consider the content of the cell to be for instance a formula (if it happens to start with an =) or a date (if it looks like one, even if it really isn't), a number (causing it for instance to remove the leading 0 of a telephone number), etc. Putting a ' in front of any text will treat it just as text which is probably what you want anyway.
 
Vote for this answer ::  
RE: Exporting from SQL to Excel puts a ; at the beginning of each Column header?

not real sure but sounds like it is csv
 
Vote for this answer ::  
RE: Exporting from SQL to Excel puts a ; at the beginning of each Column header?

I had no problem when executing import (Data/Import...) from within Excel the data from external source.

Try that.
 
Vote for this answer ::  
Update Alert Setting