Re: Converting tab delimited file to CSV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, February 18, 2008 12:08 pm, Graham Cossey wrote:
> proceed accordingly... My biggest gripe with tab delimited files is
> that they are quite a bit bigger than comma delimited files so I may
> have to split the large files I receive into smaller 'chunks' to allow
> them to be uploaded.

This is not making sense...

A tab-delimited file wil have a TAB character "\t" instead of comma ","

A tab WITHIN the data then needs escaping as "\t" or somesuch.

But commas to not need escaping with quotes.

And quotes don't need escaping with double-quotes.

So tab-delimited should be a TINY bit smaller or the same size.

Perhaps your users are just uploading more data.

> One thing I have noticed is that the files I create in my PHP script
> (The script breaks a large file into smaller files of 25,000
> records/rows each.) when opened in Excel (by double-clicking the file
> in Windows Explorer) came up with an unrecognised file format message
> for all files except the first. If you ignore this message the tab
> delimited files open OK but the comma separated ones do not. The
> "except the first" made me think that there may be something "hidden"
> at the beginning of the file to say what type of data follows.

Some CSV files include a "header" line with the names of the fields in
the first line.

This is less common in tab-delimited, but not unheard of.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux