0

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

Alok Jha
  • 562
  • 7
  • 22
  • checkout PHP Excel https://github.com/PHPOffice/PHPExcel http://stackoverflow.com/questions/11617077/looping-through-worksheets-with-phpexcel, http://stackoverflow.com/questions/23081669/read-only-specific-sheet – Akshay Khale Apr 13 '16 at 04:58

2 Answers2

1

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 
Satyapal Sharma
  • 303
  • 3
  • 11
1

Try This,

$this->load->library('simplexlsx');

$xlsx = new SimpleXLSX( $file_path );

$data['csv_data'] = $xlsx->rows();