[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_3, updated. RELEASE_3_3_4-23-gcda9df7

Marc Delisle lem9 at users.sourceforge.net
Mon Jul 12 14:56:40 CEST 2010


The branch, QA_3_3 has been updated
       via  cda9df71016cd7a85d93fbe5b38da6f532c938de (commit)
      from  b55ba34d43138b11b71d8eeae6b09ea160ded213 (commit)


- Log -----------------------------------------------------------------
commit cda9df71016cd7a85d93fbe5b38da6f532c938de
Author: Marc Delisle <marc at infomarc.info>
Date:   Mon Jul 12 08:56:30 2010 -0400

    bug [export] CSV for MS Excel (Windows) should have semi-colon as separator

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    1 +
 libraries/export/csv.php |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index de56291..ab9802e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
 - bug #3027557 [PHP] split() deprecated in PHP 5.3 (backport fixes from
 master, todo: update PHP excel?)
 - bug #3023507 [core] No result set display from stored procedure SELECT
+- bug [export] CSV for MS Excel (Windows) should have semi-colon as separator
 
 3.3.4.0 (2010-06-28)
 - bug #2996161 [import] properly escape import value
diff --git a/libraries/export/csv.php b/libraries/export/csv.php
index 9a8e520..ebcf0cd 100644
--- a/libraries/export/csv.php
+++ b/libraries/export/csv.php
@@ -70,7 +70,18 @@ function PMA_exportHeader() {
     // Here we just prepare some values for export
     if ($what == 'excel') {
         $csv_terminated      = "\015\012";
-        $csv_separator          = isset($GLOBALS['excel_edition']) && $GLOBALS['excel_edition'] == 'mac_excel2003' ? ';' : ',';
+        switch($GLOBALS['excel_edition']) {
+        case 'win':
+            // as tested on Windows with Excel 2002 and Excel 2007
+            $csv_separator = ';';
+            break;
+        case 'max_excel2003':
+            $csv_separator = ';';
+            break;
+        case 'max_excel2008':
+            $csv_separator = ',';
+            break;
+        }
         $csv_enclosed           = '"';
         $csv_escaped            = '"';
         if (isset($GLOBALS['excel_columns'])) {


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list