Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在*.xlsx使用 PHPExcel 创建一个文档,并且我正在尝试遍历一个范围内的大量单元格。我可以拆分单元格以获取范围内的第一个和最后一个单元格,但是是否可以使用 PHPfor循环遍历它们?谢谢。
*.xlsx
for
$first_cell = 'A4'; $last_cell = 'M4'; for(...) : endfor;
怎么样:
foreach (range('A','M') as $letter) { $current=$letter.'4' // where $current is the cell you are doing stuff to in the loop iteration }