The branch, master has been updated via f6ef0c87a814d96cea4a1e868fcac15935deca13 (commit) via cda9df71016cd7a85d93fbe5b38da6f532c938de (commit) from ce2cad288666f2bfd71dc21ae8e0277288834657 (commit)
- Log ----------------------------------------------------------------- commit f6ef0c87a814d96cea4a1e868fcac15935deca13 Merge: ce2cad288666f2bfd71dc21ae8e0277288834657 cda9df71016cd7a85d93fbe5b38da6f532c938de Author: Marc Delisle marc@infomarc.info Date: Mon Jul 12 08:57:05 2010 -0400
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 1 + libraries/export/csv.php | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 6373434..c0ce1ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -100,6 +100,7 @@ $Id$ - 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 e3d78f2..d4b1811 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