Current location: Hot Scripts Forums » Programming Languages » PHP » excel to mysql


excel to mysql

Reply
  #1 (permalink)  
Old 05-21-05, 06:23 AM
buzzby buzzby is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
excel to mysql

any takers for this at all?

i would like to convert my excel spreadsheets to mysql. how do i go about doing this? i know of a tute on phpfreaks that converts mysql to excel. i want it the other way.

would be greatful for any hints or tutes that cover this.

let me stress that i want to convert my excel spreadsheets into mysql.

thanx for this
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 05-21-05, 01:03 PM
liljoeyjordison liljoeyjordison is offline
Newbie Coder
 
Join Date: Jan 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
hm, I can't think of a complete solution, but Excel can Save As a text file, and if you can find a way of putting a comma after every field you could use
Code:
LOAD DATA INFILE "datafile.txt" INTO TABLE tablename FEILDS TERMINATED BY ',' ;
That should do the trick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 10-12-05, 03:33 AM
Hammy Hammy is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
You can either use PHP Excel Parser Pro (http://www.excelparser.com) if you need to keep fonts, date and cell formatting,
or if you want to process large Excel files you can use PHP Excel Converter (http://www.excelreader.com)
Both of them are PHP classes that you can use for your projects. The good thing about them is that you can download trial versions at the websites.
__________________
Hamsters not dead
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 10-12-05, 09:35 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
http://www.programmingtalk.com/showt...ighlight=excel

also liljoeyjordison's solution is good..
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 10-12-05, 11:00 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by buzzby
any takers for this at all?

i would like to convert my excel spreadsheets to mysql. how do i go about doing this? i know of a tute on phpfreaks that converts mysql to excel. i want it the other way.
You can save them as CSV and do a mySQL import on them.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 10-13-05, 09:56 AM
creepycridler's Avatar
creepycridler creepycridler is offline
Wannabe Coder
 
Join Date: Feb 2005
Location: Seatac, WA
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Yep, you can do all of the above or just save your file as a csv then import into your database using phpmyadmin.
__________________
PCSI Design Inc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
Excel to MySQL and MySQL to HtML Fr3dY PHP 16 04-28-06 03:47 AM
Convert excel to mysql perl_boy Perl 1 04-29-05 11:41 AM
Excel To MySQL eddyvlad PHP 4 01-17-05 08:44 PM
Excel document containing records, need to save as a text file to upload to mysql bearslife PHP 1 06-05-04 04:24 AM


All times are GMT -5. The time now is 08:17 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.