How to read data from a cell in an XLS document with output via a PHP variable?

Searching on the Internet, I came to the conclusion that without php_dbase.dll in any way. Next is the impenetrable wall. I do not know how to use this library. I want from the excel.xls file, which lies directly in the site directory from the first page, from the first row, from the first column (cell A1), to read the value, i.e. do not show on the page, but simply equate to a variable.

How can I bang a certain row / column?

Tell me with the teams.

  • What prevents you from using CSV instead of XLS and parsing it as a plain text file? - SoftR
  • and what prevents me from using BMP in place of XLS? ... sorry, it broke, stupidity said ... why is it necessary to change the question to resolve the issue? Well, let's say, by virtue of XLS updateability, and the hunt to learn how to use XLS ... and also I don’t know the meaning of the phrase "use CSV and already parse it") - gforce

3 answers 3

There is such a thing as PHPExcel .

And here it is written how using PHPExcel you can read Excel files using PHPExcel .

  • yep-a little ... did not have time :) - Damon
  • by reference to the web-junior is the most adequate option, but, moreover, I just don’t need an output. Well, XLS file, 20'000 lines with records, and voila, output all 20'000 to the first (or other necessary) line, and it makes no sense just to show - no. I asked how to equate to a variable. - gforce

Pay attention to PHPExcel and PHP-ExcelReader .

    I had a slightly similar theme, I don’t know, it will not ...

    The values ​​of a specific DBF or XLS string are equated to variables in PHP code .

    • at least something, well, and how, with this, equate the value of cell A1 in my excel.xls, say $ a1? - gforce