excell to db

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

excell to db

Post by m2babaey »

Hi
What if I want to upload an excell file and have its data automatically stored in a database?
thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Sorry?
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Post by m2babaey »

database tables have fields and data is stored in them.
Microsoft Excell files have fields and again data is stored in them.
I meant for entering data from excell files to database, instead of inserting all the data manually one by one, is there a way we give the excell file to php and php enters its data into the database :lol: :? :?: :idea:
User avatar
boo
Forum Commoner
Posts: 42
Joined: Mon Jul 02, 2007 11:30 am
Location: NY

Post by boo »

m2babaey wrote:database tables have fields and data is stored in them.
Microsoft Excell files have fields and again data is stored in them.
I meant for entering data from excell files to database, instead of inserting all the data manually one by one, is there a way we give the excell file to php and php enters its data into the database :lol: :? :?: :idea:
I wound go with a CSV file and then parse the file and enter the records into the table (or tables) that you need to.

You can just save the excel file as a CSV then create a form to accept the file (check file type) then read through the file and add the records to the database
Post Reply