Hello Support-Team,
ConvertService operates normally, the Excel file is also correct.
However, each time an error file is created and when opening the Excel file, we get the message that this is a wrong/unknown format. But after opening the excel-file all seems okay.
PDF-Print works fine.
Here’s our code, perhaps you have an idea what’s the problem is…
Grazie Hopsy
...
$conf->setHeader("Lohnart,Menge,Satz,Anleger,Datum");
$conf->setColIds("LA,ANZ,SATZ,WCRE,XCRE");
$conf->setColAlign('left,left,left,left,left');
$conf->setColSorting("str,str,str,str,str");
$conf->setColTypes("ro,ro,ro,ro,ro");
$conf->setInitWidths('100,100,100,100,100');
...
$grid->useModel(new MOBDATModel($myParam));
$grid->configure('MOBDAT',"ID","LA,ANZ,SATZ,WCRE,XCRE");
...
if ($_GET['print']=='excel') {
require_once("dhtmlxConnector/convert.php");
$convert = new ConvertService("dhtmlxGrid/grid2excel_02/server/generate.php");
$convert->excel("myExcel.xls", true);
}
if($_GET['print']=='pdf') {
require_once("dhtmlxConnector/convert.php");
$convert = new ConvertService("dhtmlxGrid/grid2pdf_02/server/generate.php");
$convert->pdf("myPdf.pdf", true);
}
if ($Session->isDebug()=='on') {
$grid->enable_log("log/GridConnector.txt");
}
$grid->set_config($conf);
$grid->render();
...
// error_report_2014_05_19__07_30_47.xml
<?xml version='1.0' encoding='utf-8'?>
<rows profile="color">
<head>
<column type="ro" width="100" id="LA" align="left" sort="str">Lohnart</column>
<column type="ro" width="100" id="ANZ" align="left" sort="str">Menge</column>
<column type="ro" width="100" id="SATZ" align="left" sort="str">Satz</column>
<column type="ro" width="100" id="WCRE" align="left" sort="str">Anleger</column>
<column type="ro" width="100" id="XCRE" align="left" sort="str">Datum</column>
<settings>
<colwidth>px</colwidth>
</settings>
</head>
<row id="51">
<cell><![CDATA[123]]></cell>
<cell><![CDATA[3]]></cell>
<cell><![CDATA[33.99]]></cell>
<cell><![CDATA[AHOPPE]]></cell>
<cell><![CDATA[19.05.2014]]></cell>
</row>
</rows>