Home > Backend Development > PHP Tutorial > How to determine if there are pictures in the file when uploading an Excel file in PHP_PHP Tutorial

How to determine if there are pictures in the file when uploading an Excel file in PHP_PHP Tutorial

WBOY
Release: 2016-07-20 11:11:27
Original
1004 people have browsed it

How to determine if there are pictures in the file when uploading an Excel file in PHP. Friends in need can refer to it.

 代码如下 复制代码
$excelPath = 'Test.xls';
 
 $objReader = PHPExcel_IOFactory::createReader('Excel5');
 $objReader->setReadDataOnly(true);
 
 $objPHPExcel = $objReader->load($excelPath);
 $currentSheet = $objPHPExcel->getActiveSheet();
 $AllImages= $currentSheet->getDrawingCollection();
 
 if(count($AllImages) > 0) {
    //处理
 }

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444638.htmlTechArticleHow to judge whether there are pictures in the file when uploading an Excel file with php. Friends in need can refer to it. The code is as follows Copy the code $excelPath = 'Test.xls'; $objReader = PHPExcel_IOFactory::create...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template