Re: writing Excel files through PHP
| From: | Greg Beaver | Date: | Sat, 10 Jan 2004 16:01:42 +0000 |
| Subject: | Re: writing Excel files through PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174205@lists.php.net to get a copy of this message | ||
Hi,
You might also consider using Spreadsheet_Excel_Writer
http://pear.php.net/package/Spreadsheet_Excel_Writer
Regards,
Greg
--
phpDocumentor
http://www.phpdoc.org
Binay wrote:
Hi all, I m generating an Excel file though PHP by sending the appropriate header and then using HTML <TD> tags to write data in different cells. Below is my code snippet. It has got 1 problems: 1. Image doesn't come/showup in Excel sheet. <?php header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=pareto_combined.xls"); ?> <tr colspan=8> <td height=50> <img src='../../../extra/images/log.jpg'></td> <td align=right><img src='../../../extra/images/mickey_sup.jpg'></td> </tr> <?php $dateF=$_REQUEST['dateF']; $dateT=$_REQUEST['dateT']; $agentID=$_REQUEST['agentID']; <tr> <td class='graybg'><?php echo $agentID</td> <td class='graybg'><?php echo $dateF</td> <td class='graybg'><?php echo $dateT</td> </tr> ?> now after saving the Excel file it displays all alphanumeric data correctly but images do not show up. i think Img tag is not supported by Excel application. So my question is how can i display the images in Excel using PHP? plz help me out Thanks in advance Binay