我需要使用 PHPExcel 折叠带有图像的行。
分组:http: //imgur.com/nO6m9lf,6zRcFa5
折叠没有图像的行:http : //imgur.com/nO6m9lf,6zRcFa5#1
现在图像显示如下:
$objDrawing = new PHPExcel_Worksheet_MemoryDrawing();
$objDrawing->setName($element["product_code"]);
$objDrawing->setDescription($element["product_code"]);
$objDrawing->setImageResource($gdImage);
$objDrawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG);
$objDrawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT);
$objDrawing->setHeight(150);
$objDrawing->setCoordinates('B'.$n);
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
$objPHPExcel->getActiveSheet()->getHeaderFooter()- >addImage($objDrawing,PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT);
$objPHPExcel->getActiveSheet()->getRowDimension($n)->setRowHeight(113);
$objPHPExcel->getActiveSheet()->getRowDimension($n)->setOutlineLevel(1);
$objPHPExcel->getActiveSheet()->getRowDimension($n)->setCollapsed(true);
如何使用 PHPExcel 折叠带有图像的行?