Re: Converting tab delimited file to CSV
| From: | Graham Cossey | Date: | Mon, 18 Feb 2008 14:12:28 +0000 |
| Subject: | Re: Converting tab delimited file to CSV | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269476@lists.php.net to get a copy of this message | ||
On Feb 18, 2008 1:58 PM, Edward Kay <edward@labhut.com> wrote:
>
> > Now, I can replace the tabs with commas and opening the resulting
> > files in a basic text editor all looks fine.
>
> When you do this, ensure you escape any commas that may exist in the data.
>
> IIRC, Excel handles this be enclosing the whole field in "double quotes".
> Can remember how it handles escaping these though...
>
> Edward
>
>
I know I can Open in Excel and then go through an "import" process
specifying the delimiter and string enclosure etc, however the files I
used to get were "true" CSV files and opened fine, I'm wondering if
there's some kind a file header or the like that specifies the kind of
data contained in the file.
I don't have an issue with commas within the data, but thanks for highlighting.
Probably just excel trying to be "helpful" again and totally scr3wing
things up :-/
--
Graham