Image PNG (transparent background), loses this attribute to edit and save

Topics: Developer Forum, User Forum
Oct 26, 2013 at 9:42 PM
Edited Oct 26, 2013 at 9:45 PM
I am new to PHP, I have an excel sheet that contains an image in PNG format, which is an outline of a map with transparent background, you want to fill with data from a MySQL table in the empty space of image once recorded the excel sheet with the information requested, but the data are now covered by prevention image as it loses the transparent background attribute and for this reason the data is covered by the image. the question is, How do I fix this problem?

I would appreciate a little help.


Rolando Segovia

$inputFileType = 'Excel5';
// $inputFileType = 'Excel2007';
$inputFileName = 'plantillas/Rosenda97.xls';
/ Create a new Reader of the type defined in $inputFileType /
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
/ Load $inputFileName to a PHPExcel Object /
$objPHPExcel = $objReader->load($inputFileName);

// Add some data
$sql = "SELECT * FROM arana_promedio WHERE LOTECODE = 101 AND SUBSTR(FECHA,1,4) = '2006' AND SUBSTR(FECHA,7,1) = '3' AND SUBSTR(FECHA,9,2) = '14'";
$result = mysql_query($sql ,$conexion);
$numero = mysql_num_rows($result); // obtenemos el número de filas
   while($row = mysql_fetch_array($result)) { 

      $objPHPExcel->setActiveSheetIndex(0)  /*->setCellValue('A' . $j, $result1[$j]['name']);*/
                    ->setCellValueByColumnAndRow($row["X"], $row["Y"], $row["PROM"]);
// printf("<tr><td> %s</td></tr>", $row["codigo"]);

mysql_close($conexion); //cierra la conexion 
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');