Bug #62075 – Export to CSV for fields of type TEXT is not working properly

When you export data to CSV, fields of type “text” that contain, for example, the characters “new line” create problems at the import stage on the Excel worksheet. Below is the patch file to apply to include/export_utils.php.

You could follow the bug by http://www.sugarcrm.com/support/bugs.html#issue_62075

[code language=”php”]
From 3249d7de911089e70929b7630240dc256288ac5f Fri, 29 Mar 2013 00:00:43 +0100
From: Antonio Musarra <antonio.musarra@gmail.com>
Date: Wed, 20 Mar 2013 10:39:32 +0100
Subject: [PATCH] Bug #62075 – Export to CSV for fields of type TEXT is not working properly

diff –git a/include/export_utils.php b/include/export_utils.php
index 1e4f5e3..e2d8fcf 100644
— a/include/export_utils.php
+++ b/include/export_utils.php
@@ -312,6 +312,10 @@
$value = implode(",",$valueArray);
+ // Bug 62075 – Export to CSV for fields of type TEXT is not working properly
+ case ‘text’:
+ $value = trim(preg_replace(‘/ss+/’, ‘ ‘, $value));
+ break;

Liferay Portal Security AuditCos'è e come funzione il framework di Security Audit

Vi siete mai chiesti cos'è e come funziona il sistema di Security Audit di Liferay? Ho cercato di rispondere alla domanda non soffermandomi solo al "cosè e come funziona", sono andato ben oltre. Non vi resta che leggere questo EBook per scoprire.

Ottieni il tuo EBook

Antonio Musarra

I began my journey into the world of computing from an Olivetti M24 PC (http://it.wikipedia.org/wiki/Olivetti_M24) bought by my father for his work. Day after day, quickly taking control until … Now doing business consulting for projects in the enterprise application development using web-oriented technologies such as J2EE, Web Services, ESB, TIBCO, PHP.

You may also like...

Liferay SSL/TLS SecurityCome configurare il bundle Liferay per abilitare il protocollo SSL/TLS

Sei curioso di scoprire come configurare il bundle Liferay per funzionare in modalità sicura tramite protocollo SSL/TLS? In questo eBook ( #LFRDEPGUIDE ) ti spiego come farlo step-by-step; per il bundle Apache Tomcat e WildFly. Ricorda di lasciare un tuo feedback dopo averlo letto.