我使用phpexel读取exel(.xlsx)文件,但我想只计算那些非黑色的行。我的代码如下。
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
$worksheetData = $objReader->listWorksheetInfo($inputFileName);
foreach ($worksheetData as $worksheet) {
if($worksheet['worksheetName']=="abc"){
$TotalRow_a = $worksheet['totalRows'];}
if($worksheet['worksheetName']=="xyz"){
$TotalRow_x = $worksheet['totalRows'];
}
if($worksheet['worksheetName']=="op"){
$TotalRow_o = $worksheet['totalRows'];}
}