How does php determine whether there are pictures in the uploaded Excel file?
This article mainly explains "how to judge whether there is a picture in the uploaded Excel file by php". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "php how to determine whether there is a picture in the uploaded Excel file"!
We need to use the library PHPExcel.
The copy code is as follows:
$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) {/ / processing} so far, I believe you have a better understanding of "how php judges whether there is a picture in the uploaded Excel file". Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!