I'm trying to read an Excel file (Office 2003). There is an Excel file that needs to be uploaded and its contents parsed.
Via Google, I can only find answers to these related (and insufficient topics): generating Excel files, reading Excel XML files, reading Excel CSV files, or incomplete abandoned projects. I own Office 2003 so if I need any files from there, they are available. It's installed on my box but isn't and can't be installed on my shared host.
Edit: so far all answers point to PHP-ExcelReader and/or this additional article about how to use it.
PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc. In this tutorial, we are going learn how to read and write the xlsx file. You can integrate it with your database if you need.
- It can Read and Write excel files in php, also, it can create PDF documents and Charts. - $objectClass is the object instance of the class. - $excel->sheets[0]['numRows'] contains the number of rows with data in first sheet. - $excel->sheets[0]['numCols'] contains the number of columns with data in first sheet.
You have 2 choices as far as I know:
PHPExcel uses Spreadsheet_Excel_Reader for the Office 2003 format.
Update: I once had to read some Excel files but I used the Office 2003 XML format in order to read them and told the people that were using the application to save and upload only that type of Excel file.
I use PHP-ExcelReader to read xls files, and works great.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With