SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Tab Delimited csv File All Data is in 1 Column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jbates99
Constraint Violating Yak Guru

385 Posts

Posted - 05/02/2013 :  18:13:22  Show Profile  Reply with Quote
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 - Delimited
Column Names in the first row
The File Name points to an existing .csv file

Column-Delimiter is tab

The 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

India
52320 Posts

Posted - 05/03/2013 :  03:07:59  Show Profile  Reply with Quote
have you tried opening in textpad? it may be that excel shows them inside same column but values separated by commas

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

jbates99
Constraint Violating Yak Guru

385 Posts

Posted - 05/03/2013 :  09:30:04  Show Profile  Reply with Quote
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
Go to Top of Page

James K
Flowing Fount of Yak Knowledge

3712 Posts

Posted - 05/03/2013 :  09:46:44  Show Profile  Reply with Quote
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.
Go to Top of Page

jbates99
Constraint Violating Yak Guru

385 Posts

Posted - 05/13/2013 :  10:03:52  Show Profile  Reply with Quote
My mistake everyone. I discovered that the file has fixed-width columns. Now everything is good.
Sorry for the inconvenience.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52320 Posts

Posted - 05/14/2013 :  00:54:35  Show Profile  Reply with Quote
Oh ok. That explains it
Glad that you got it sorted out.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000