|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
php read excel
hii y'all,
simple yet annoying question: with php, is it possible to read a particular column/row from excel file (*.xls). Thank you, I really appreciated your helps. |
|
#2
|
||||
|
||||
|
I don't know of a native way of doing this, but given that you can use PHP libraries to write Excel files, I suspect an industrious programmer could come up with a way to decode and read a spreadsheet. Give google a shot and see what you can turn up.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
||||
|
||||
|
After searching Google (using the words PHP and Excel) I found what appears to be an answer in a different forum. I'll paste the code sample here so we can view it with fancy colours, but I give full credit to RQuadling's post in this forum.
PHP Code:
|
|
#4
|
|||
|
|||
|
Quote:
MCD, Tried this solution, but not able to make it work. Something is missing, maybe explaination of how to implement or another class needed to run. I noticed all the original posts on this, from my inet searches, show these calling PEAR, but some of the later classes, have been scrubbed to be PEAR free, so maybe that is what is needed? Please add details needed to run this correctly, PEAR free. Thanks! OMR |
|
#5
|
|||
|
|||
|
All,
Have dowloaded and tried the following classes and/or excel tools for PHP: Code:
Excel Class No example file to test Excel Reader Test 1 fails Excel Reader Test 2 writes code and errors to screen Excel XML Opens Excel but writes crap in the file EZ Excel Only show three java gen'd image markers on page PHP Excel Shows only text on page PHP Excel 1.5.5 Shows only text on page SAM Excel Give COM error TBS Excel Shows good test page, links open Excel, but file has garbage in it XLS Gen Test Only shows PHP code as text XLS Gen SQL 1 Only shows PHP code as text XLS Stream D Opens Excel but writes crap in the file XLS Stream E Gives PHP error XMerge Displays XML code Code:
<html> <table border=2> <tr> <td>Excel Class<p>No example file to test</td> </tr> <tr> <td><a href="Zips/Excel Reader/example.php">Excel Reader T1</a></td> </tr> <tr> <td><a href="Zips/Excel Reader/example2.php">Excel Reader T2</a></td> </tr> <tr> <td><a href="Zips/Excel XML Parse/sample.php">Excel XML</a></td> </tr> <tr> <td><a href="Zips/EZ Excel/test_easyexcel.html">EZ Excel</a></td> </tr> <tr> <td><a href="Zips/PHP Excel/Tests/runall.php">PHP Excel</a></td> </tr> <tr> <td><a href="Zips/PHP Excel 1.5.5/Tests/runall.php">PHP Excel 1.5.5</a></td> </tr> <tr> <td><a href="Zips/SAM Excel/testclass.php">SAM Excel</a></td> </tr> <tr> <td><a href="Zips/TBS Excel/demo_main.htm">TBS Excel</a></td> </tr> <tr> <td><a href="Zips/XLS Gen/test.phtml">XLS Gen Test</a></td> </tr> <tr> <td><a href="Zips/XLS Gen/test_mysql_1.phtml">XLS Gen SQL 1</a></td> </tr> <tr> <td><a href="Zips/XLS Stream/example_download.php">XLS Stream Download</a></td> </tr> <tr> <td><a href="Zips/XLS Stream/example_export.php">XLS Stream Export</a></td> </tr> <tr> <td><a href="Zips/XMerge/build.xml">XMerge</a></td> </tr> </table> </html> The three (3) showing promise are: Excel XML TBS Excel XLS Stream but more work is needed to find out why they read or write garbage into their files. OMR |
|
#6
|
|||
|
|||
|
If by "excel read" you mean the phpexcelread class you can download from sourceforge,
I have some insight on why it doesn't work for you. There are two files, reader.php and oleread.inc. In reader.php, there is a line that says include_once and it has oleread.php listed, when it should be oleread.inc. I'm completely unsure why he released it with that mistake. Also, the path for the file was wrong. Once those two things are fixed, it works great. I however was having problems still, and it turned out the excel files I was trying to read were encrypted. Just right click, properties, go to advanced and disable it. Sorry for reviving a dead thread ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > php read excel |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|