Universal Data Exporter PHP Support Product Page
ExcelWriter.php Error
Asked 19 Jul 2010 16:30:13
1
has this question
19 Jul 2010 16:30:13 Christene SPD posted:
Hello. I am using the data exporter successfully on one project but am running in to a problem trying to use it on another. Both versions of the ExcelWriter include are exactly the same. On one site it works, on the other I get an error something like:Parse error: syntax error, unexpected '=', expecting ')' in /homepages/46/htdocs/ScriptLibrary/ExcelWriter.php on line 103
Any ideas why this would work correctly on one site and not another? Thanks.
Edited by - Christene SPD on 19 Jul 2010 16:30:45
Replies
Replied 20 Jul 2010 09:42:57
20 Jul 2010 09:42:57 Miroslav Zografski replied:
Hello Christene,
Please, provide here the code of the page in question.
Regards,
Please, provide here the code of the page in question.
Regards,
Replied 20 Jul 2010 16:24:52
20 Jul 2010 16:24:52 Christene SPD replied:
Here is my source. I've simplified what I am trying to do. The field I am trying to export is a simple numeric ID so I do not believe data is interfering. I get the exact same error whether I am trying to export Excel, CSV or PDF which tells me there is a bug in the "ExcelWriter" include: "Parse error: syntax error, unexpected '=', expecting ')' in /homepages/46/d132676393/htdocs/nbaa/ScriptLibrary/ExcelWriter.php on line 103"
<?php require_once('../Connections/NBAA.php'); ?> <?php require_once('../ScriptLibrary/dmxDataExporter.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_select_db($database_NBAA, $NBAA); $query_Recordset1 = "SELECT contact_id FROM contacts"; $Recordset1 = mysql_query($query_Recordset1, $NBAA) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); ?> <?php // Universal Data Exporter 1.1.3 // Type: excel $ude1 = new dmxExcelExporter(); $ude1->type = 0; $ude1->fillColor = "#FFFF66"; $ude1->evenFillColor = "#FFFFFF"; $ude1->lineSize = 0.3; $ude1->lineColor = "#000000"; $ude1->stripHtmlTags = true; $ude1->useTableHeader = false; $ude1->fontName = "helvetica"; $ude1->fontSize = 12; $ude1->fontColor = "#000000"; $ude1->cellBold = false; $ude1->cellItalic = false; $ude1->rowHeight = 10; $ude1->fileName = "export"; $ude1->download = true; $ude1->saveCopy = false; $ude1->saveLocation = " "; $ude1->sourceRecordset = $Recordset1; $ude1->sourceFieldsString = "contact_id,contact_id,50,C,L,0,T"; $ude1->doExport(); ?> <?php mysql_free_result($Recordset1); ?>
Edited by - Christene SPD on 20 Jul 2010 16:26:06
Replied 20 Jul 2010 21:08:19
20 Jul 2010 21:08:19 Christene SPD replied:
Well I suspect this problem may have been from an older version of PHP. From what I can tell, it seems like ExcelWriter.php does not work with php 4.4. I wish that would have been in the 'requirements' documentation. I have projects that I will not be able to use this on.
Replied 03 Aug 2010 22:36:06
03 Aug 2010 22:36:06 Dan Ove Tuven replied:
I get this error message too, after "upgrading" from UDE 1.1.2 to 1.1.3.
I run PHP 4.3.10-16 and it would be nice to actually know which limitations this extension has.
In the product features in detail you claim: "You don't need to write any additional code or install server components; only PHP 4+ is required on your server."
The reason for trying to upgrade from 1.1.2 to 1.1.3 was problems with excel export with more than 1000 rows. The excel sheet contains no data...
Looking forward to a clarification on the issue.
I run PHP 4.3.10-16 and it would be nice to actually know which limitations this extension has.
In the product features in detail you claim: "You don't need to write any additional code or install server components; only PHP 4+ is required on your server."
The reason for trying to upgrade from 1.1.2 to 1.1.3 was problems with excel export with more than 1000 rows. The excel sheet contains no data...
Looking forward to a clarification on the issue.
Replied 30 Aug 2010 13:37:21
30 Aug 2010 13:37:21 Miroslav Zografski replied:
Hello,
It is a problem with the PHP versions under PHP 4.9.x
We had this investigated and solution is applied. Currently under testing. You will receive an e-mail when we have this extension updated.
Regards,
It is a problem with the PHP versions under PHP 4.9.x
We had this investigated and solution is applied. Currently under testing. You will receive an e-mail when we have this extension updated.
Regards,
Replied 20 Mar 2023 00:26:17
20 Mar 2023 00:26:17 User replied:
All the 'number' text fields are now being exported to Banks Near Me excel correctly, but with the surrounding quotes. I suppose we can live with that.