好的,这是一些代码
$highestRow = 16; // e.g. 10
$highestColumn = 'F'; // e.g 'F'
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); // e.g. 5
for ($row = 9; $row <= $highestRow; ++$row) {
$val=array(); //i have initialized the array
for ($col = 1; $col <= $highestColumnIndex; ++$col) {
$cell=$objWorksheet->getCellByColumnAndRow($col, $row);
$val[]=$cell->getValue();
}
echo $val[0] //from what is read from excel, it returns data like this 7563
}
数据在 Excel 工作表中之前、之前、B9
拥有75
、B10
拥有6
和B11
拥有的情况3
读完后我echo $val[0] //output 7563
现在我想在结果中添加额外的数据,所以如果我echo $val[0]
在添加信息后显示输出为
echo $val[0] //output average=75% ; rsd = 6%; n=3% instead of just 7563