php が phpexcel クラスを使用して Excel をエクスポートすると、セルの内容は基本的に関数式で書かれます。これは非常に遅いです。こんな事に遭遇したことはありませんか
例を見てみましょう
$objPHPExcel->setActiveSheetIndex(1)->insertNewRowBefore($count,1); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('A'.$count, $value['partnum']); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('B'.$count, $value['wafer']); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('C'.$count, $value['package']); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('D'.$count, $value['bpandsum']); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('E'.$count, "=MAX('forecast data'".'!$R$'.($count+1).",'forecast data'".'!$S$'.($count+1).')'); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('F'.$count, "=Sheet1!E".$count."+'forecast data'!D".($count+1)."+'forecast data'!E".($count+1)); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('G'.$count, "=E".$count."+SUM('forecast data'!D".($count+1).":G".($count+1).")"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('H'.$count, "=E$count+SUM('forecast data'!D".($count+1).":I".($count+1).")"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('I'.$count, "=E$count+SUM('forecast data'!D".($count+1).":K".($count+1).")"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('J'.$count, "=ROUNDUP((MAX(0,E$count-'forecast data'!M".($count+1)."-'forecast data'!N".($count+1)."-'forecast data'!U".($count+1).")*'forecast data'!P".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('K'.$count, "=ROUNDUP((MAX(0,F$count-'forecast data'!M".($count+1)."-'forecast data'!N".($count+1)."-'forecast data'!U".($count+1).")*'forecast data'!P".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('L'.$count, "=ROUNDUP((MAX(0,G$count-'forecast data'!M".($count+1)."-'forecast data'!N".($count+1)."-'forecast data'!U".($count+1).")*'forecast data'!P".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('M'.$count, "=ROUNDUP((MAX(0,H$count-'forecast data'!M".($count+1)."-'forecast data'!N".($count+1)."-'forecast data'!U".($count+1).")*'forecast data'!P".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('N'.$count, "=ROUNDUP((MAX(0,I$count-'forecast data'!M".($count+1)."-'forecast data'!N".($count+1)."-'forecast data'!U".($count+1).")*'forecast data'!P".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('O'.$count, "=ROUNDUP(SUM('forecast data'!D".($count+1).":E".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('P'.$count, "=ROUNDUP(SUM('forecast data'!F".($count+1).":G".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('Q'.$count, "=ROUNDUP(SUM('forecast data'!H".($count+1).":I".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)"); $objPHPExcel->setActiveSheetIndex(1)->setCellValue('R'.$count, "=ROUNDUP(SUM('forecast data'!J".($count+1).":K".($count+1).")/0.9/('forecast data'!AF".($count+1)."/1000),0)");
上に投稿したコードは 400 回ループします
できません出てきて直接電話を切ります