Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2013-05-02 : 18:13:22
|
hi experts,I'm trying to push out my resultset to a .csv as tab-delimited.In my Flat File Connection, the settings are:Format - DelimitedColumn Names in the first rowThe File Name points to an existing .csv fileColumn-Delimiter is tabThe Preview is perfect - all data is lined up under the correct Column Heading** The problem is that when I open the .csv file in Excel - the data is all in a single column.What could I have done wrong?Thanks for any help. Jack |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-03 : 03:07:59
|
have you tried opening in textpad? it may be that excel shows them inside same column but values separated by commas------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2013-05-03 : 09:30:04
|
Thanks visakh16.When I open the file with Notepad/Wordpad - it looks good. The Column Headings and the row data have spaces.When I open it with Excel, the column headings are all bunched together. But the row data is separated by a few spaces between columns. Is this normal? I suppose it will work.No commas, I'm using tab-delimited.Thanks, Jack |
|
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-05-03 : 09:46:44
|
Excel interprets a file with .csv extension as indeed being a "comma separated file". There may be cleverer ways to do this, but usually what I do is rename it with another extension such as .txt and then use Excel's File->Open menu. That will cause Excel to prompt you for delimiters; select tab as the delimiter. |
|
|
jbates99
Constraint Violating Yak Guru
396 Posts |
Posted - 2013-05-13 : 10:03:52
|
My mistake everyone. I discovered that the file has fixed-width columns. Now everything is good.Sorry for the inconvenience. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-05-14 : 00:54:35
|
Oh ok. That explains itGlad that you got it sorted out.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|