473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

convert excel file to mysql database using php

hi i need to convert a excel sheet to mysql database format using php code.I am not getting any help on the net on this topic.I need the code not an autogeneration tool.If any of you can solve the problem please post the answer :
i have 1.>Book.xls,2.>Mysql database on a server
Thank You.
Aug 5 '07 #1
2 2222
jx2
228 100+
the simpliest way to do it woud be saving your data as "comma" separated text file not an excell file
if you want to use excell file you need to write binary on your own(that means a lot of work!!)
i did something like that for jpeg(exif data) if you need that for excell you need to find the description of excell file format and you need to know how to handle binaries

your only hope is that there is someone who did it before and share the code
:-)

regards
jx2
Aug 5 '07 #2
pbmods
5,821 Expert 4TB
Heya, vinitaJ. Welcome to TSDN!

As jx2 suggested, your best course is to save the file in CSV ('comma-separated values') format. Then, you can use MySQL's LOAD DATA INFILE command.
Aug 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Johnny | last post by:
I was looking for information on how to import an excel file or other text file into a MySql database. I have done this with both access and SQL Server and am looking for a way to do this in...
3
by: bawar | last post by:
Hey, I can say I belong to the newbies in this subject. I own my own website with mySQL-databases, but now I have to show one table of those mySQL-databases in an excel worksheet. It is the...
1
by: dimitri | last post by:
i try to copy data from excel into my MySql database which runs on a linux. i use MS Access to access the database. i need to optain the unique id number, and this is where i have some troubles....
6
by: xpcer | last post by:
Please help me to convert database. This is the problem, i work at an IT company. i'm junior database engineer at there. my task is converting database file from another format to mysql format....
0
by: dan84 | last post by:
I write my code : #inizializzazioni varie che tralascio #mi connetto al mio db mysql e recupero i dati che volgio inserire nel file excel conn = MySQLdb.connect(host = "XXX", port = XXX, user...
6
by: Justin | last post by:
Hi all, i need some help over here... i found the solution to export file from mysql db into *.csv. but is there anyway to convert the contents into *.doc and save in my webserver and providing a...
2
kamill
by: kamill | last post by:
I need to convert excel file into PDF file using PHP, how can i do it. I am able to generate a pdf file. Is there any solution to export excel data into mysql database? I am waiting for help.
5
by: Sport Girl | last post by:
Hi everybody. I am new in PERL language and working in it since little hours, actually i am still a trainee and i need help please. In fact, i need a script in PERL that enables me to retrieve...
5
by: Sport Girl | last post by:
Hi again my great online assistants, just would like to say that i'm testing the script under unix , and after researches on the internet, i have realised that to resolve 500 Internal Server Error,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.