From de7abbdd5be0a885bf96333746175ba6857032f9 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 13 Aug 2008 16:28:43 +0000 Subject: [PATCH] bug #2045512 [export] Numbers in Excel export --- ChangeLog | 1 + libraries/export/htmlexcel.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bdb51392b..ece5406bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA displayed, thanks to Maik Wiege - mswiege - bug #2037381 [export] Export type "replace" does not work - bug #2037375 [export] DROP PROCEDURE needs IF EXISTS +- bug #2045512 [export] Numbers in Excel export 2.11.8.0 (2008-07-28) - patch #1987593 [interface] Table list pagination in navi, diff --git a/libraries/export/htmlexcel.php b/libraries/export/htmlexcel.php index 5edc684b4..47ddc36b8 100644 --- a/libraries/export/htmlexcel.php +++ b/libraries/export/htmlexcel.php @@ -162,6 +162,8 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } } // end if + $fields_meta = PMA_DBI_get_fields_meta($result); + // Format the data while ($row = PMA_DBI_fetch_row($result)) { $schema_insert = ''; @@ -173,7 +175,11 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { } else { $value = ''; } - $schema_insert .= '' . htmlspecialchars($value) . ''; + $schema_insert .= 'numeric) { + $schema_insert .= ' x:num '; + } + $schema_insert .= '>' . htmlspecialchars($value) . ''; } // end for $schema_insert .= ''; if (!PMA_exportOutputHandler($schema_insert)) {