Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: Show more of an Excel worksheet

$
0
0
Good Morning, I would like to know how do I display more than one worksheet excel with PHPExcel. I have the following code which shows only the first sheet of my file.

$ objReader = PHPExcel_IOFactory :: CreateReader ('Excel2007');
$ objReader-> setReadDataOnly (true);
$ $ = objPHPExcel objReader-> load ("Test.xlsx");
$ $ = objWorksheet objPHPExcel-> getActiveSheet ();
$ $ = highestRow objWorksheet-> getHighestRow ();
$ $ = highestColumn objWorksheet-> getHighestColumn ();
highestColumnIndex $ :: = PHPExcel_Cell columnIndexFromString ($ highestColumn);

for ($ row = 6, $ row <$ highestRow; $ row + +) {
   for ($ col = 0; $ col <= 1; $ col + +) {
     $ objWorksheet-> getCellByColumnAndRow ($ col, $ row) -> getValue ();
   }

I wonder how to show the other sheets in my file?

Thank you.

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>