473,394 Members | 1,960 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,394 software developers and data experts.

Importing data from Excel into PHP

Is it possible to import data from excel file into php and than put it in
mysql database?
Nov 9 '05 #1
7 7683
my brother imports excel sheets straight into mysql - would that be of
use to you ?

Nov 9 '05 #2
I ment only data from excel sheets, from fields A1,A2,B1,B2 etc. then I
could sort this data out and put them nicely into mysgl database
my brother imports excel sheets straight into mysql - would that be of
use to you ?

Nov 9 '05 #3
Michal Maciejczak wrote:
I ment only data from excel sheets, from fields A1,A2,B1,B2 etc. then I
could sort this data out and put them nicely into mysgl database


sounds like a job for the COM functions:

http://us3.php.net/manual/en/ref.com.php

--
Justin Koivisto, ZCE - ju****@koivi.com
http://koivi.com
Nov 9 '05 #4
Save the data you want imported as CSV... then use mysqlimport from the
command line or in your PHP code!!
Another problem solved by GOD...

Frank
Michal Maciejczak wrote:
Is it possible to import data from excel file into php and than put it in
mysql database?

Nov 10 '05 #5
Frank [GOD] wrote:
Save the data you want imported as CSV... then use mysqlimport from the
command line or in your PHP code!!
Another problem solved by GOD...

Frank

I'm using this in my website with no problem. I think it's the best (or
only?) solution cause you can also manipulate the data....

e.g $fp is the csv file

$tmp=fgets($fp);
while(!feof($fp)) {
$tmp=fgets($fp);
$t=explode(";",$tmp);
$val=str_replace("\"","",$t);
$val=str_replace("\\","",$val);

insert into....
Nov 10 '05 #6
mi***************@tesco.net says...
Is it possible to import data from excel file into php and than put it in
mysql database?


Check out:
http://sourceforge.net/projects/phpexcelreader/
and
http://paggard.com/projects/xls.reader/

Geoff M
Nov 10 '05 #7
Thank you very much,
That's exacly what I've been looking for
Nov 11 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Little PussyCat | last post by:
Hello, I nee to write something that will transfer excel data into an SQL Server table. I have for another database application I wrote have it importing Excel spreadsheet data using cell by...
11
by: Grim Reaper | last post by:
I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for...
9
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then...
7
by: Darren | last post by:
I have been attempting to create a reservation planning form in excel that imports Data from an Access database and inserts that information automaticly into the correct spreed sheet and the...
2
by: nutthatch | last post by:
I want to be able to import an Excel spreadsheet into Access 2K using the macro command Transferspreadsheet. However, the file I am importing (over which I have no control) contains some records...
9
by: jillandgordon | last post by:
I am trying to import an excel file into Access 97. It looks perfectly all right but, every time I try to import it, I get to the lst step and am told that it was not imported due to an error. ...
1
by: Geoff Jones | last post by:
Hi I have a question which I hope somebody can answer. I have written a VB application with which I want to import an Excel file, analyze the data within it and do some calculations. There are...
2
by: Snozz | last post by:
The short of it: If you needed to import a CSV file of a certain structure on a regular basis(say 32 csv files, each to one a table in 32 databases), what would be your first instinct on how to...
2
by: jereviscious | last post by:
Hi all - Last resort time. I'm importing data from a spreadsheet that I receive from one of my vendor using interop.excel. The date field in excel is entered as 4/7/2006, but when I retrieve...
5
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.