$ periodOne =阵列(阵列(' SNO''评价'' TOT'' AVG',' CLS TOT',' CLS AVG',' DIFF'));
$rowID = 7;
foreach($periodOne as $rowArray) {
$columnID = 'A';
foreach($rowArray as $columnValue) {
$this->setActiveSheetIndex(0)->mergeCells('B7:D7');
$this->getActiveSheet()->setCellValue($columnID.$rowID,$columnValue);
$columnID++;
}
$rowID++;
}
答案 0 :(得分:0)
$periodOne=array(array('SNO','Appraisal','TOT','AVG','CLS TOT','CLS AVG','DIFF'));
$rowID = 7;
foreach($periodOne as $rowArray) {
$columnID = 'A';
foreach($rowArray as $columnValue) {
if($columnID.$rowID == 'C7')
{
$columnID = 'E';
$this->getActiveSheet()->setCellValue($columnID.$rowID,$columnValue);
}
else
{
$this->getActiveSheet()->setCellValue($columnID.$rowID,$columnValue);
}
$columnID++;
}
$rowID++;
}