Import excel files with image in php/mysql -


I want to create an import script which allows users to upload their excel files (extension is not required) Php in the application

The application must reconstruct a list of items (so far).

The difficulty in this matter is that there are images in Excel files ...

I have read information about the Phfixel library but it does not say anything about the images.

Any thoughts?

You can use pictures.

To import images:

  $ objPHPExcel = PHPExcel_IOFactory :: load ("MyExcelFile.xls"); Forex Currency ($ objPHPExcel-> getSheetByName ("My Sheet") -> Drawing Calculation (as a $ Draw) {if ($ drawing example PHPExcel_Worksheet_MemoryDrawing) {ob_start (); Call_user_func ($ drawing-> getRenderingFunction (), $ drawing-> getImageResource ()); $ ImageContents = ob_get_contents (); Ob_end_clean (); }}  

Then $ Image Contents will contain image data that you can output or save as a file. You can see this question:

Images to access:

All image objects in the active worksheet will return by the array object:

  $ objPHPExcel-> GetActiveSheet () - & gt; Receive drawer calculation); These objects will be either the  PHPExcel_Worksheet_Drawing  or  PHPExcel_Worksheet_MemoryDrawing  objects: You can identify which one you use Described) can either use the appropriate methods to either read the image data from the file (for the PHPExcel_Worksheet_Drawing object) or directly from the PHPExcel_Worksheet_MemoryDrawing object  and  getDescription ()  methods to image To retrieve the objects related to objects, Can be used. 

Now the image may also be associated with print headers:

  $ objPHPExcel-> GetActiveSheet () - & gt; GetHeaderFooter () - & gt; GetImages ()  

can be used to retrieve images from the header / footer This is an array of PHPExcel_Worksheet_HeaderFooterDrawing Objects to remove all the PHPExcel_Worksheet_Drawing methods for extracting the image file from all these objects Can be used.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -