Do tabs take up more disk space than commas?

C

Conan Kelly

Hello all,

I have 35 text data files, one for each month.

In Windows Explorer, when I set the View to display Details, I can see the
file size.

I notice one single file is double the size of the others. This file has
the same format as the file before it and the one after it. It also has
roughly the same amount of rows. The only difference that I can see is that
this file is tab delimited instead of comma separated/delimited.

Does a tab take up more space than a coma?

Thanks for any help anyone can provide,

Conan Kelly
 
E

Earl Kiosterud

Conan,

If the text files are truly tab-delimited, then each tab would be one character (one byte),
same as a comma. But if they're space-padded (to get space between fields, then they'll be
larger, as there are several spaces instead of a tab. Open them with Notepad, and see how
the cursor behaves as you press right arrow and left. If it jumps across a space, it's
really a tab, but it may move one space at a time, in which case it's space-padded.

You can open the files with Word, and turn on the Show-Hide button. Tabs show up as a
right-pointing arrow, where spaces show up as a dot (like a period, but raised from the
bottom of the line).

Some files are padded with spaces to get the visual layout desired, and are called
"space-delimited." But these aren't truly delimiters. Pretty hard to parse a file (split
it into its fields) with single spaces within a field (like Tom Jones) and lots of spaces
between the fields. YOu can't determine where the fields really begin and end. You can use
fixed-character parsing (as Data - Text to columns can do), if you know where the fields
begin and end. These files are designed to provide a print-style layout (and are often
*.prn files).

--
Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
 
A

Andrew Rossmann

[This followup was posted to microsoft.public.excel and a copy was sent
to the cited author.]

Hello all,

I have 35 text data files, one for each month.

In Windows Explorer, when I set the View to display Details, I can see the
file size.

I notice one single file is double the size of the others. This file has
the same format as the file before it and the one after it. It also has
roughly the same amount of rows. The only difference that I can see is that
this file is tab delimited instead of comma separated/delimited.

Does a tab take up more space than a coma?

Technically, a tab and a comma should each take up one byte.

One possible issue is the use of quote characters (") needed. Cell data
will be 'wrapped' with the quotes if it contains certain characters,
such as commas in a cell when using CSV.

Try using a text editor such as NOTEPAD to open up the files and see
what looks different. It may not be obvious as many will expand the
tabs, making it look funny.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top