PHP Classes

Lossing Excel Cell Format

Recommend this page to a friend!

      PHP Report  >  All threads  >  Lossing Excel Cell Format  >  (Un) Subscribe thread alerts  
Subject:Lossing Excel Cell Format
Summary:When I try export a PDF from Excel template.
Messages:2
Author:Yoinier Hernandez Nieves
Date:2013-07-08 00:02:08
Update:2013-07-08 04:27:05
 

  1. Lossing Excel Cell Format   Reply   Report abuse  
Picture of Yoinier Hernandez Nieves Yoinier Hernandez Nieves - 2013-07-08 00:02:08
Hi, good project.

My problem is this, I have a XLS template, formatted a have need, but when I create a pdf file lost the cell formats.

How to need do for fix this problem.

Best Regards, Yoinier.

  2. Re: Lossing Excel Cell Format   Reply   Report abuse  
Picture of Yoinier Hernandez Nieves Yoinier Hernandez Nieves - 2013-07-08 04:27:05 - In reply to message 1 from Yoinier Hernandez Nieves
I continue with problems

I try that

$res = $adb->query("SELECT * FROM tablename WHERE tableid = '".purify($_REQUEST['record'])."'");
$table = $adb->fetch_array($res);

$template= strtolower($table['tabletype']).'.xls';
$templateDir='doc_templates/';

$config=array(
'template'=>$template,
'templateDir'=>$templateDir
);

$controller = new PHPReport($config);

$controller->load(array(
'id'=>'table',
'data'=>array(
$table
)
)
);

echo $controller->render($format);
exit();

and in the excel file, in cell what i need print value type

{table:tabletype}

But export the cell with "{table:tabletype}", not with the value en BD.

Why??

Best regards.