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

New Post: Worksheet Tab color

$
0
0
Hi friends,
I am using phpexcel library to import excel files. When I acquire the Phpexcel object after loading the file, I loop around all the sheets to read their data. I need to know the tab color of the worksheets to branch my code so I am using Worksheet->getTabColor() function to access it but it is returning null. It seems that the worksheet tab color is getting read by the library.

My code is like this:-
$excelReader = PHPExcel_IOFactory::createReader($writer);
$excelReader->setReadDataOnly(FALSE);
$excelReader->setLoadAllSheets(TRUE);
$excelObj = $excelReader->load($file);
$worksheetNames = $excelObj->getSheetNames($file);
foreach ($worksheetNames as $sheetName) {
            var_dump($excelObj->getSheetByName($sheetName)->getTabColor());
        }
Every time it is returning printing null. Please help somebody.

Viewing all articles
Browse latest Browse all 2707


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