El problema es el siguiente, cuando genero un reporte en excel, y en cierto campo donde no hay decimales , al momento de querer hacer operaciones en el excel me funciona perfectamente, y al contrario cuando un campo del excel que se genero lleva decimales no me permite hacer operaciones, como que el campo decimal me lo pasa como objeto, quisiera ver si me pudieran ayudar con este problema.
// Codigo :
<?php
include("../includes/conectar.i");
include("../includes/enca.i");
$shtml="<table>";
$shtml=$shtml."<td>Cia</td><td>Pta</td><td>Socio</td><td>F.Efectiva</td><td>Importe</td><br></tr>";
$resmae=mysql_query("SELECT * FROM movmae WHERE soc_mae>='$soc' and afec_mae = 'no' order by cia_mae, pta_mae, soc_mae",$Conexion);;
while($rowmae=mysql_fetch_array($resmae))
{
$cvecia = $rowmae["cia_mae"];
$cvepta = $rowmae["pta_mae"];
$soc = $rowmae["soc_mae"];
$fpag = $rowmae["fpag_mae"];
$imp = $rowmae["imp_mae"];
$imp = $rowmae["imp_mae"];
$timp = $timp + $imp;
$shtml=$shtml."<tr>";
$shtml=$shtml."<td>$cvecia</td><td>$cvepta</td><td>$soc</td><td>$fpag</td><td><p align=\"right\">$imp</td><br></tr>";
$scarpeta=""; //carpeta donde guardar el archivo.
//debe tener permisos 775 por lo menos
$sfile=$scarpeta."transito.xls"; //ruta del archivo a generar
$fp=fopen($sfile,"w");
fwrite($fp,$shtml);
fclose($fp);
}
$shtml=$shtml."<tr>";
$shtml=$shtml."<td></td><td></td><td></td><td>Total</td><td>$timp</td><br></tr>";
$scarpeta=""; //carpeta donde guardar el archivo.
//debe tener permisos 775 por lo menos
$sfile=$scarpeta."transito.xls"; //ruta del archivo a generar
$fp=fopen($sfile,"w");
fwrite($fp,$shtml);
fclose($fp);
echo "<DIV style=\"PADDING-TOP: 5px\"><img border=\"0\" src=\"images/header.jpg\" width=\"540\" height=\"60\"> </DIV></TD>"
."<TABLE height=\"73\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" border=\"0\">"
."<div align=\"center\">"
." <center>"
." <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"260\" id=\"AutoNumber1\" bgcolor=\"#D8AA74\" height=\"107\">"
." <tr>"
." <td height=\"107\" width=\"258\">"
." <p align=\"center\"> <b><font face=\"Arial\" size=\"2\">La operación se realizó exitosamente</font></b></p>"
." <p align=\"center\"><b><font face=\"Arial\" size=\"2\">"
." <<a href='".$sfile."'>Haz click aqui para ver el reporte</a>"
." </td>"
." </tr>"
." </table>"
." </center>"
."</div>";
$shtml=$shtml."</table>";
?>
// FIn Codigo
Gracias por la ayuda que me puedan brindar.