Creating HTML code for Excel with images!
Posted: Thu Feb 04, 2010 9:14 am
Hi, Im hoping someone can help me with this as I can't find a "simple" solution to this anywhere. We create reports based on content managed data that create tab separated data for the user to view in Excel. The problem was that then the client wanted a logo and formatting on that data in Excel. So we have generated the data as HTML tables instead, but then still save the HTML as Excel anyway using headers.
header("Content-Type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=$filename");
This works fine with all the formatting, and the img tag logo displays fine in Excel on a PC. But on a Mac you get a missing image box and an error message. I presume this is some kind of security thing, stopping the Excel from calling an online image? So I have started researching a way around this and can't find anything! Everyone just says to call the image online to insert an image into Excel, which is obviously what I am doing. There seems to be no one else reporting this Mac problem. The only solutions I have found involve a re-write using purchased software. Does anyone have any ideas?
header("Content-Type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=$filename");
This works fine with all the formatting, and the img tag logo displays fine in Excel on a PC. But on a Mac you get a missing image box and an error message. I presume this is some kind of security thing, stopping the Excel from calling an online image? So I have started researching a way around this and can't find anything! Everyone just says to call the image online to insert an image into Excel, which is obviously what I am doing. There seems to be no one else reporting this Mac problem. The only solutions I have found involve a re-write using purchased software. Does anyone have any ideas?