Looping through worksheets with PHPExcel

前端 未结 3 915
情深已故
情深已故 2021-02-05 08:07

I\'m using the PHPExcel library to read an Excel file and perform processing on it. I want to loop through each worksheet. I checked the documentation and all I could find was

3条回答
  •  一向
    一向 (楼主)
    2021-02-05 08:22

    You're using iterators. Did you look at the code example for iterators in the /Tests directory? If so, you might have seen reference to the WorksheetIterator

    Alternatively, the getAllSheets() method of the PHPExcel object returns an array of worksheets, which allows you to use a foreach loop

提交回复
热议问题