Jump to content

Creating XLS (Excel) files with embedded images in PHP


pthurmond

Recommended Posts

I have been scouring the internet and irc channels for the last week trying to figure out how to do this. I have a project where I need to make an excel file (*.xls) that I insert images into. They cannot be links to the image, they have to be the image themselves. To make matters worse, since the script I have to design has to run automatically every 30 minutes (in the background) I cannot count on a browser output to do any of the work for me.

 

Does anyone have any ideas? Am I just up the creek here? I have yet to find a tool that will embed the image into the Excel file.

 

Thanks,

Patrick

What about outputting it as a pdf and then using php to convert it to xls with the embedded images? I know how to output it as a pdf with the images. But not how to do the conversion. Would that make this more feasible? Or perhaps from another file type to xls?

 

I am will to work with jury-rigged ideas, so don't be shy if you have a crazy idea. I am open to just about anything at this point.

 

Thanks,

Patrick

I wanted to let everyone know that I finally figured out how to do this with a tool that can be found here: http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=Home&referringTitle=Features

 

This tool does everything I want and more. It would be the perfect Excel tool in any PHP coders library. So take a look at it and have fun!

FYI: It requires three extensions to be installed; php_xmlrpc, php_zip, and php_gd2. The zip extension is not the default one in PHP 5.2.6 and neither is the xmlrpc, however GD2 does come with it and can be installed with PHP. I had to dig around to find what I needed for this.

 

Thanks,

Patrick

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.