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

This commit is contained in:
Marc Delisle
2010-07-12 08:56:30 -04:00
parent b55ba34d43
commit cda9df7101
2 changed files with 13 additions and 1 deletions

View File

@@ -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'])) {