Page 1 of 1

How to read data from excel sheet

Posted: Fri Feb 20, 2009 6:11 pm
by clarance
Hello,

I am doing some work for a basketball agent who essentially wants to be able to just upload his excel sheet with player statistics and then my code has to take the date from that sheet and store it in his database.

I have used this tutorial:

http://www.ibm.com/developerworks/opens ... index.html

But there are some error in his/her code, specifically in the $dom = DOMDocument::load( $_FILES['file']['tmp_name'] ); function.

Does anyone have any experience with this or maybe can guide me in the right direction.

thanks B

Re: How to read data from excel sheet

Posted: Sat Feb 21, 2009 12:05 am
by susrisha
There are a number of free Excel Reading Classes available over internet to read the Excel sheets and do whatever you can with the excel data. I am attaching you one of those classes which i used for one of my projects. The code contains an example also to make u understand. Also you will not require any special php inclusions. just place the folder Excel where you want the class to be included.

Re: How to read data from excel sheet

Posted: Sat Feb 21, 2009 3:55 am
by clarance
What if I want to be able to uplaod a file seeing that there will be hundreds of different players with different statistics?

Re: How to read data from excel sheet

Posted: Sat Feb 21, 2009 5:22 am
by Mark Baker
clarance wrote:What if I want to be able to uplaod a file seeing that there will be hundreds of different players with different statistics?
Whatever tool or library you use to read the Excel workbooks, they need to be on the server that is running your reader script, or at least on a box that is accessible from your web server... but there's dozens of examples of how to upload files to a web server across the internet, and even in these forums.... try doing a search on uploading files

Re: How to read data from excel sheet

Posted: Sat Feb 21, 2009 5:34 am
by clarance
thank you.

you have been a great help.

C