473,804 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

convert excel file to mysql database using php

1 New Member
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 2245
jx2
228 New Member
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 Recognized Expert Expert
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
31085
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 MySql. I have several hundred items i want to import into a parts database that is currently in an excel file but can be saved as comma separated or other format. Any help would be greatly appreciated. Thanks in advance. Zach
3
2019
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 intention that the user opens the excel-file trough the browser, so I hope there does not have to be installed anything on the clients machine... (I looked at that MyODBC but I don't understand it 100 % yet, I'm newbie hey). It would be very nice if...
1
2672
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. how can i either insert data, so my unique id number is continuing or, how can i access my MySql database with MS Access without a "Unique Record Identifier"?
6
5405
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. for example : our client give me the DBF file or MDB file. So, i must to convert it to mysql format. The problem will happen when i want to transfer the file from the old file to new file. I mean like it :
0
1266
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 = "XXX", passwd = "XXX", db= "XXX") cursor = conn.cursor() cursor.execute("SELECT * FROM XXX")
6
8664
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 link for the end users to download the word file? FYI, the database records are obtained by end users submitting the forms themselve and i saved it in my db... Thanx.
2
4795
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
6169
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 data from a table from the database in MySQL and write its contents in an excel sheet file as an excel repot. I have done a script but it is still in draft cause it's not working. Can somebody help me please.
5
5092
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, we should put the script in cgi-bin directory, use of ASCII transfer mode, chmod 755 scriptname.cgi, and then login to unix and type ./scriptname.cgi. I have connected to the database using mysql -u***** -p***** bugs and i could have access to the...
0
9714
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10351
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9174
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7638
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3834
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.