Hello,
How can I convert an Excel spreadsheet into a two-dimensional PHP array?

    2 answers 2

    If the file is of type xls, it is better to convert to xlsx. Unzip the file as a regular zip archive. Find the sheet you need at xl / worksheets / sheetXX.xml, where "XX" is the sheet number. You may also need the xl / sharedStrings.xml sheet, if there is one, and xl / styles.xml. And then SimpleXML to help. And, most likely, it is necessary to tinker well with the presentation of data.

    If it is necessary to fully automate this process, look towards ready solutions like PHPExcel ...

    If you want to write your bike or learn more about the structure of xml-files used in xlsx, please inform.

    If you need to get a completely ready solution, do not come to me.

      PHPExcel does everything ...