You are here: Re: how to put Excel data into mysql? « PHP Language « IT news, forums, messages
Re: how to put Excel data into mysql?

Posted by BearItAll on 11/21/72 11:33

On Fri, 02 Dec 2005 11:55:39 +0800, no-email wrote:

> Hi,
>
> I have Excel tables to upload to mySQL. How do i do it
> (1) Via phpMyAdmin
> (2) Via a php program?
>
> tia

Does excel have an export to dbf?

OpenOfice spreadsheet does. It may not be ideal enough to export your data
in one step, so you might have to add a csv step anyway. Its best to do an
experiment first anyway.

Open your file in OO, first check the column names for illegal dbase
names. Check that the column data is formated, the auto format tends to
output everything as text. So select columns of dates/numbers for specify
the format.

Then use saveas to dbase format.

MySQL can use external files, I can't remember off the top of my head, so
you'll have to look on MySQL web site. Once there you could use phpmyadmin
to copy the table structure into an isam, then a select/insert to copy
the data.

Of cause, if your tables and fields are few you could just create them
manually and import the csv of your data.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация