Alok Jha Alok Jha - 1 year ago 168
PHP Question

Xlsx file, Read all spreadsheet in php

I am using simplexlsx to read xlsx sheet,

I have multiple tabs in my xlsx file, When I am trying to read data, its shows data only for first tab,

for better understanding i have attach print screen.

enter image description here

Answer Source

It is because when you select something from an excel file it performs that action with the active sheet which is by default is the first one.

You need to change that to the required sheet Use the following code to do that

$objPHPExcel->setActiveSheetIndex($count); // Use no of the sheet you want to select -1 as count 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download