pthurmond Posted May 6, 2008 Share Posted May 6, 2008 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 Link to comment https://forums.phpfreaks.com/topic/104327-creating-xls-excel-files-with-embedded-images-in-php/ Share on other sites More sharing options...
pthurmond Posted May 6, 2008 Author Share Posted May 6, 2008 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 Link to comment https://forums.phpfreaks.com/topic/104327-creating-xls-excel-files-with-embedded-images-in-php/#findComment-534595 Share on other sites More sharing options...
rhodesa Posted May 6, 2008 Share Posted May 6, 2008 As far as I know, this can't be done with PHP. If the script is on a windows system though, you can check out OLE: http://www.google.com/search?q=excel+ole Link to comment https://forums.phpfreaks.com/topic/104327-creating-xls-excel-files-with-embedded-images-in-php/#findComment-534599 Share on other sites More sharing options...
pthurmond Posted May 11, 2008 Author Share Posted May 11, 2008 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 Link to comment https://forums.phpfreaks.com/topic/104327-creating-xls-excel-files-with-embedded-images-in-php/#findComment-538423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.