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

Re: [Sheflug] MySQL help



On Wednesday 24 Apr 2002 12:19 pm, Steve Tickle wrote:

> I'm trying to populate a MySQL table with data which is actually held in an
> Excel worksheet. The problem is that when I save the worksheet as a text
> file some of the data gets out of skew. Is there any other file format I
> can import the data from, whether by using "load data infile" or any other
> method?

The format I usually use for such things is CSV (by text, do you mean CSV?). 
CSV is fairly straightforward, but Excel can do silly things with it 
sometimes. If your data has any commas in it they will have to be escaped 
somehow, usually by being in quotes. Quoting and commas are usually the 
things that trip up parsers, some of them are horribly naive. Theres some 
pretty good packages for Perl that read CSV - it shouldn't be too hard to 
write an importer.
___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.