MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 20th, 2003, 04:12 AM
collins23 collins23 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: kampala uganda
Posts: 19 collins23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
php mysql excel

is it possible to use php mysql microsoft excel combination to design a database driven website.because i already have excel documents so it will be hard work to start all over with mysql

Reply With Quote
  #2  
Old August 20th, 2003, 07:38 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
You'll just need to create the tables in mysql. Then you can import the data by slurping in delimited files exported from Excel.

Reply With Quote
  #3  
Old August 20th, 2003, 07:49 PM
pentapenguin pentapenguin is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 51 pentapenguin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 36 m 7 sec
Reputation Power: 6
Hi.
I would be sure to look at "Advanced PHP for the World Wide Web" by Larry Ullman.
He has a good section on Excel and PHP in there.
Also, it is one of the best PHP books out there, and I highly recommend it.
Take a look at http://us4.php.net/com.
There's some good stuff....

As far as I know (I could be wrong), PHP with Excel support will only work on Windows.
So, it will work on your own machine, but probably not on a Linux server. Sorry
Also, if more than one person uses a Excel sheet at one time, it could get currupted.
So you should look at MySQL (www.mysql.com) which will work on both Windows and Linux.

Last edited by pentapenguin : August 20th, 2003 at 07:53 PM.

Reply With Quote
  #4  
Old August 22nd, 2003, 05:37 AM
collins23 collins23 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: kampala uganda
Posts: 19 collins23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
in reply to dhouston php excel

Quote:
Originally posted by dhouston
You'll just need to create the tables in mysql. Then you can import the data by slurping in delimited files exported from Excel.


dhouston please explain your answer in more detail so i can understand

Reply With Quote
  #5  
Old August 22nd, 2003, 08:19 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
An Excel document is typically composed of rows and columns. So is a mysql table. In order to get your data into mysql, you'll need to create a mysql table whose structure (row and column types) corresponds to the structure of the Excel spreadsheet. You can then export your Excel document as a delimited file and import it into your mysql database using command line tools that ship with mysql. I seldom have occasion to do this and so don't have the commands at my fingertips, but you can research them at mysql.com. I believe PHPMyAdmin has tools that'll allow you to import delimited files without having to know anything about the command line interface to mysql.

If your data won't change much over time, you could also just export your spreadsheet as tab-delimited text and write code that'll parse the file and display results without having to use mysql at all. I don't recommend this, though, because it's not as clean or as functional has having a real database.

Reply With Quote
  #6  
Old July 6th, 2004, 02:27 AM
engineermkg engineermkg is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: India
Posts: 1 engineermkg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to engineermkg
Quote:
Originally Posted by dhouston
An Excel document is typically composed of rows and columns. So is a mysql table. In order to get your data into mysql, you'll need to create a mysql table whose structure (row and column types) corresponds to the structure of the Excel spreadsheet. You can then export your Excel document as a delimited file and import it into your mysql database using command line tools that ship with mysql. I seldom have occasion to do this and so don't have the commands at my fingertips, but you can research them at mysql.com. I believe PHPMyAdmin has tools that'll allow you to import delimited files without having to know anything about the command line interface to mysql.

If your data won't change much over time, you could also just export your spreadsheet as tab-delimited text and write code that'll parse the file and display results without having to use mysql at all. I don't recommend this, though, because it's not as clean or as functional has having a real database.

I suppose,'Mysqlimport' command in mysql is the answer to your problem.
Here is an example for that
Here is a sample session that demonstrates use of mysqlimport:

shell> mysql -e 'CREATE TABLE imptest(id INT, n VARCHAR(30))' test
shell> ed
a
100 Max Sydow
101 Count Dracula
.
w imptest.txt
32
q
shell> od -c imptest.txt
0000000 1 0 0 \t M a x S y d o w \n 1 0
0000020 1 \t C o u n t D r a c u l a \n
0000040
shell> mysqlimport --local test imptest.txt
test.imptest: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
shell> mysql -e 'SELECT * FROM imptest' test
+------+---------------+
| id | n |
+------+---------------+
| 100 | Max Sydow |
| 101 | Count Dracula |
+------+---------------+
For more info refer:URL
You can also use fgetcsv function in php to parse a delimited file .
refer URL for more info.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > php mysql excel


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT