I am using PHPExcel for import data from excel file. but I find some problems where the data was dynamically repeated per sheets and I wanted to take the last sheet to process. Is there any idea or method to get the highest sheet index ?
Asked
Active
Viewed 4,945 times
1 Answers
11
Get the total number of sheets:
$sheetCount = $excelObj->getSheetCount();
The last sheet index will be:
$lastSheet = $sheetCount - 1;

Ben
- 8,894
- 7
- 44
- 80
-
Thanks ! It Works Ben :D – Mochamad Zaula Jul 14 '16 at 13:26
-
@MochamadZaula Glad I could help! If it solved your problem don't forget to accept it as the answer, thank you :) – Ben Jul 14 '16 at 13:44