Re: Best way to delimit text file



However, try opening csv.txt with Excel and it doesn't
even give you a chance to parse the data.

There should be no difference in the way csv.txt and tab.txt are handled.
Both should take you through the Text Import Wizard. I have never
experienced what you are describing.

If you do get eveything in one column, then you can use Data=>Text to
Columns

--
Regards,
Tom Ogilvy


"AnExpertNovice" <j@The~N_o~S_p_a_m~PostOffice.com> wrote in message
news:eCaYGxNKGHA.2036@xxxxxxxxxxxxxxxxxxxxxxx
I would try an experiment so you can see for yourself benefits and draw
backs.

Create an Excel workbook and copy the following text into the stated
cells.
I would not copy the "A1:" portion of each line.

A1: Col 1
A2: This isn't a lot of fun, but it needs to be done.
A3: 1
A4: 4

B1: Col 2
B2: 2
B3: Plus, a famous quote says; "Seeing is Believing"
B4: 4

You end up with 2 columns and 4 rows with a header. You also have a mix
of
text and numbers.

Now, do a File | Save As and save to the following files and the
following
formats.
File ............ Type
Tab.txt....... Text (Tab delimited)
Csv.csv...... CSV (Comma delimited)
Csv.txt...... CSV (Comma delimited) (alternatively rename the csv.csv
file
to csv.txt)
and any other formats you want to try.

Open each with notepad to see what they look like. With the CSV. notice
all
the extra double quotes used. This doesn't look pretty if you now want to
print the file from the text file. Without the extra quotes the file
would
not be imported into Excel, Access, etc. properly.

Open each with Excel. The .csv tells Excel what to use as a delimiter and
so it works nicely. However, try opening csv.txt with Excel and it
doesn't
even give you a chance to parse the data. You get the extra quotes. Now,
try to parse it manually. Good luck!

What I have found in my limited experience is that Tab Separated is a more
universally accepted method of creating delimited files. Albeit by a very
slim margin. One application only accepts Tab Separated. (Which I think
is
a weakness of the application, per a TIMTOWTDI ideology.)


--
My handle should tell you enough about me. I am not an MVP, expert, guru,
etc. but I do like to help.


"ern" <erniedude@xxxxxxxxx> wrote in message
news:1138916907.758034.211260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

AnExpertNovice wrote:
I have a simple standard. Tab Delimited with a Header row. (the
header
row
solves issues when importing into Access.)

I deviate from this only when the user insists upon another format and
only
when they convince me that I can't convince them.

To manually create a tab delimited file:
File | Save As
Then select "Text (Tab delimited) (*.txt)" as the "Files of type"
option.

Awesome. Thanks. Is it too much to ask to show a few lines of what a
tab-delimited text file would look like ? I will be writing to this
text file from a program, so I won't be able to manually create the
file as you suggested. I could however insert a '\t' between Excel
entries in the text file. thanks again.





.



Relevant Pages

  • Re: Fastest way to read data to populate combo controls?
    ... dumping the whole thing into a CSV and parse it using VB. ... When you talk about using a CSV, Ralph, I have no clue how VB would ... The Excel macro creates a Word document with six tables: ... If bPath Then ...
    (microsoft.public.vb.general.discussion)
  • Re: CustomHow can I create pipe "|" delimited .csv ?
    ... extension but it's no longer in a .csv format - it's saved as a MS Word Text ... Excel opens it directly - bypassing the import options. ... that, however, the pipe delimiter has been discarded. ...
    (microsoft.public.mac.office.excel)
  • Re: Fastest way to read data to populate combo controls?
    ... dumping the whole thing into a CSV and parse it using VB. ... When you talk about using a CSV, Ralph, I have no clue how VB would ... The Excel macro creates a Word document with six tables: ... "How To Use ADO with Excel Data from Visual Basic or VBA"http://support.microsoft.com/kb/257819 ...
    (microsoft.public.vb.general.discussion)
  • Re: Read comma-delimited [Long]
    ... > use ACCESS but as yet not EXCEL, ... Which may not work if the delimiter is a combination of quotes and commas, ... especially if the comma is contained within a quote-delimited field. ... CSV is a "semi-standard" and any shop should be able to handle it ...
    (comp.lang.cobol)
  • How to store "3D" data? (data structure question)
    ... I have to parse a text file (was excel, but I translated to CSV) like ... and I am not sure how to store it (to manipulate it ...
    (comp.lang.python)