apulmca Posted November 11, 2008 Share Posted November 11, 2008 Hi All, I have to process an Excel file using PHP. How can I do it? I know,"how to handle Files in PHP". But, how can we fetch data from a Excel file? I don't know. So please help. Thanks PHPOpenSource Quote Link to comment Share on other sites More sharing options...
bobbinsbro Posted November 11, 2008 Share Posted November 11, 2008 i had the same problem not long ago. i found this: http://www.codeplex.com/PHPExcel which works beautifully. i couldn't find much good documentation for reading excel files (but quite a bit for writing them), so i had to read through the code and figure out which functions to call, and what results to expect. PM me if you need any help with this. Quote Link to comment Share on other sites More sharing options...
apulmca Posted November 11, 2008 Author Share Posted November 11, 2008 Hi, I don't want to create the excel file. I want to fetch data from Excel file. If you have any code or tutorial, please tell me. Thanks Quote Link to comment Share on other sites More sharing options...
bobbinsbro Posted November 11, 2008 Share Posted November 11, 2008 that library isn't only for writing excel, but also for reading it (both xls and xlsx formats). Quote Link to comment Share on other sites More sharing options...
radalin Posted November 11, 2008 Share Posted November 11, 2008 You may also want to try this: http://sourceforge.net/projects/phpexcelreader. But it does not support .xlsx I suppose you have to check that. Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted November 11, 2008 Share Posted November 11, 2008 I'd recommend PHPExcel as well... partly because I'm one of the development team; but also because it's still an ongoing project with regular releases to add new functionality, whereas the phpexcelreader project on sourceforge appears to have stagnated. PHPExcel allows you to both read and write Excel (Excel 5 xls and Excel 2007 xlsx) files (and write to a variety of other formats as well). You can also manipulate the data within the workbook, and it handles over 200 of Excel's 351 functions for calculating values including complex formulae. While the documentation isn't perfect, there's a full set of API docs, and sample code; and a helpful forum on the codeplex site. Quote Link to comment Share on other sites More sharing options...
bobbinsbro Posted November 11, 2008 Share Posted November 11, 2008 @mark baker: well, i guess i need to thank you for making my life extremely easy lately. so thanx but please tell the devs to comment their code... Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted November 11, 2008 Share Posted November 11, 2008 @mark baker: well, i guess i need to thank you for making my life extremely easy lately. so thanx but please tell the devs to comment their code... I'll pass it on... at the moment I'm wading through the classes doing a lot of minor performance tweaks; so I should probably be adding more comments myself as I'm doing so... and more comments for the phpdocs as well. And for the benefit of people who might stumble upon this thread while looking for a way of using HTML/Ajax to edit Excel in a web page, I'm doing some work on some special front-end stuff to handle that as well Quote Link to comment Share on other sites More sharing options...
bobbinsbro Posted November 11, 2008 Share Posted November 11, 2008 thanx. i will worship the ground on which you walk. lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.