diff --git a/ChangeLog b/ChangeLog
index 6575b6bdd..af1a76bf4 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,10 @@ $Source$
* lang/czech: Updated.
* libraries/charset_conversion.lib.php: Do not convert, if charsets are
same.
+ * config.inc.php, export.php, lang/*, libraries/config_import.lib.php,
+ libraries/display_export.lib.php, libraries/export/xls.php,
+ Documentation.html: EXPERIMENTAL native MS Excel export support, using
+ PEAR module Spreadsheet_Excel_Writer (RFE #968110).
2004-06-07 Alexander M. Turek
* css/phpmyadmin.css.php: beautifications.
diff --git a/Documentation.html b/Documentation.html
index b9fc10d9f..a13ab0a02 100755
--- a/Documentation.html
+++ b/Documentation.html
@@ -1711,6 +1711,15 @@ Defaults to FALSE (drop-down).
+ $cfg['TempDir'] string
+
+ The name of the directory, where temporary files can be stored.
+
+ This is needed for native MS Excel export, see FAQ
+ 6.23
+
+
+
$cfg['Export'] array
In this array are defined default parameters for export, names of
@@ -3583,6 +3592,26 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
Yes. If a bookmark has the same label as a table name, it will be
executed.
+
+
+ [6.23] Export: I heard phpMyAdmin can export MS Excel files, how can I
+ enable that?
+
+
+ You can either export as CSV suitable for MS Excel, what works out of the
+ box or you can try native experimental MS Excel exporter. For
+ enabling this you need to set $cfg['TempDir'] to place where web server
+ user can write and install PEAR module Spreadsheet_Excel_Writer into php
+ include path. The installation can be done by following command:
+
+
+ pear -d preferred_state=beta install -a Spreadsheet_Excel_Writer
+
+
+ First part of switches set we want to install beta version of that module
+ (no stable version available yet) and then we tell pear we want to satisfy
+ dependencies.
+
[7. phpMyAdmin project]
diff --git a/config.inc.php b/config.inc.php
index 536bea614..2e4cabf1b 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -303,7 +303,7 @@ $cfg['DefaultTabTable'] = 'tbl_properties_structure.php';
* Export defaults
*/
-$cfg['Export']['format'] = 'sql'; // sql/latex/excel/csv/xml
+$cfg['Export']['format'] = 'sql'; // sql/latex/excel/csv/xml/xls
$cfg['Export']['compression'] = 'none'; // none/zip/gzip/bzip2
$cfg['Export']['asfile'] = FALSE;
@@ -311,6 +311,9 @@ $cfg['Export']['onserver'] = FALSE;
$cfg['Export']['onserver_overwrite'] = FALSE;
$cfg['Export']['remember_file_template'] = TRUE;
+$cfg['Export']['xls_columns' = FALSE;
+$cfg['Export']['xls_null'] = 'NULL';
+
$cfg['Export']['csv_columns'] = FALSE;
$cfg['Export']['csv_null'] = 'NULL';
$cfg['Export']['csv_separator'] = ';';
@@ -565,6 +568,9 @@ $cfg['SaveDir'] = ''; // Directory where phpMyAdmin can sa
$cfg['docSQLDir'] = ''; // Directory for docSQL imports, phpMyAdmin can import
// docSQL files from that directory. For example
// './docSQL'. Leave empty for no docSQL import support.
+$cfg['TempDir'] = ''; // Directory where phpMyAdmin can save temporary files.
+ // This is needed for MS Excel export, see documentation
+ // how to enable that.
/**
diff --git a/export.php b/export.php
index 1e0b8331d..5742e7aee 100644
--- a/export.php
+++ b/export.php
@@ -56,7 +56,7 @@ function PMA_exportOutputHandler($line)
global $time_start, $dump_buffer, $dump_buffer_len, $save_filename;
// Kanji encoding convert feature
- if (function_exists('PMA_kanji_str_conv')) {
+ if ($GLOBALS['output_kanji_conversion']) {
$line = PMA_kanji_str_conv($line, $GLOBALS['knjenc'], isset($GLOBALS['xkana']) ? $GLOBALS['xkana'] : '');
}
// If we have to buffer data, we will perform everything at once at the end
@@ -68,10 +68,10 @@ function PMA_exportOutputHandler($line)
$dump_buffer_len += strlen($line);
if ($dump_buffer_len > $GLOBALS['memory_limit']) {
- // as bzipped
if ($GLOBALS['output_charset_conversion']) {
$dump_buffer = PMA_convert_string($GLOBALS['charset'], $GLOBALS['charset_of_file'], $dump_buffer);
}
+ // as bzipped
if ($GLOBALS['compression'] == 'bzip' && @function_exists('bzcompress')) {
$dump_buffer = bzcompress($dump_buffer);
}
@@ -146,10 +146,13 @@ if (empty($asfile)) {
// Defines the default format
$crlf = PMA_whichCrlf();
+$output_kanji_conversion = function_exists('PMA_kanji_str_conv') && $type != 'xls';
+
// Do we need to convert charset?
$output_charset_conversion = $asfile &&
$cfg['AllowAnywhereRecoding'] && $allow_recoding
- && isset($charset_of_file) && $charset_of_file != $charset;
+ && isset($charset_of_file) && $charset_of_file != $charset
+ && $type != 'xls';
// Set whether we will need buffering
$buffer_needed = isset($compression) && ($compression == 'zip' | $compression == 'gzip' | $compression == 'bzip');
@@ -212,6 +215,9 @@ if ($asfile) {
if ($type == 'csv') {
$filename .= '.csv';
$mime_type = 'text/x-csv';
+ } else if ($type == 'xls') {
+ $filename .= '.xls';
+ $mime_type = 'application/excel';
} else if ($type == 'xml') {
$filename .= '.xml';
$mime_type = 'text/xml';
@@ -480,15 +486,8 @@ if (!empty($asfile)) {
// 1. as a gzipped file
if (isset($compression) && $compression == 'zip') {
if (@function_exists('gzcompress')) {
- if ($type == 'csv' ) {
- $extbis = '.csv';
- } else if ($type == 'xml') {
- $extbis = '.xml';
- } else {
- $extbis = '.sql';
- }
$zipfile = new zipfile();
- $zipfile -> addFile($dump_buffer, $filename . $extbis);
+ $zipfile -> addFile($dump_buffer, substr($filename, 0, -4));
$dump_buffer = $zipfile -> file();
}
}
diff --git a/lang/afrikaans-iso-8859-1.inc.php b/lang/afrikaans-iso-8859-1.inc.php
index ef79c8324..e160e376e 100644
--- a/lang/afrikaans-iso-8859-1.inc.php
+++ b/lang/afrikaans-iso-8859-1.inc.php
@@ -755,4 +755,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/afrikaans-utf-8.inc.php b/lang/afrikaans-utf-8.inc.php
index 01c0d992c..43d95e879 100644
--- a/lang/afrikaans-utf-8.inc.php
+++ b/lang/afrikaans-utf-8.inc.php
@@ -756,4 +756,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/albanian-iso-8859-1.inc.php b/lang/albanian-iso-8859-1.inc.php
index f4ec61a64..6c12f919e 100644
--- a/lang/albanian-iso-8859-1.inc.php
+++ b/lang/albanian-iso-8859-1.inc.php
@@ -747,4 +747,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/albanian-utf-8.inc.php b/lang/albanian-utf-8.inc.php
index c13264e8e..22972609a 100644
--- a/lang/albanian-utf-8.inc.php
+++ b/lang/albanian-utf-8.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/arabic-utf-8.inc.php b/lang/arabic-utf-8.inc.php
index ffb80310e..032c85351 100644
--- a/lang/arabic-utf-8.inc.php
+++ b/lang/arabic-utf-8.inc.php
@@ -749,4 +749,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/arabic-windows-1256.inc.php b/lang/arabic-windows-1256.inc.php
index cf3623341..bfa41324a 100644
--- a/lang/arabic-windows-1256.inc.php
+++ b/lang/arabic-windows-1256.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/azerbaijani-iso-8859-9.inc.php b/lang/azerbaijani-iso-8859-9.inc.php
index a55d3f991..0f5892a19 100644
--- a/lang/azerbaijani-iso-8859-9.inc.php
+++ b/lang/azerbaijani-iso-8859-9.inc.php
@@ -744,4 +744,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/azerbaijani-utf-8.inc.php b/lang/azerbaijani-utf-8.inc.php
index 17ec1565d..ffacd8179 100644
--- a/lang/azerbaijani-utf-8.inc.php
+++ b/lang/azerbaijani-utf-8.inc.php
@@ -745,4 +745,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/basque-iso-8859-1.inc.php b/lang/basque-iso-8859-1.inc.php
index e6bccf296..ffc0062d7 100644
--- a/lang/basque-iso-8859-1.inc.php
+++ b/lang/basque-iso-8859-1.inc.php
@@ -747,4 +747,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/basque-utf-8.inc.php b/lang/basque-utf-8.inc.php
index ea567c251..63ac90aa4 100644
--- a/lang/basque-utf-8.inc.php
+++ b/lang/basque-utf-8.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/bosnian-utf-8.inc.php b/lang/bosnian-utf-8.inc.php
index db2b8cf08..782a5ac23 100644
--- a/lang/bosnian-utf-8.inc.php
+++ b/lang/bosnian-utf-8.inc.php
@@ -754,4 +754,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/bosnian-windows-1250.inc.php b/lang/bosnian-windows-1250.inc.php
index 414f516fc..1cdf4306d 100644
--- a/lang/bosnian-windows-1250.inc.php
+++ b/lang/bosnian-windows-1250.inc.php
@@ -753,4 +753,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/brazilian_portuguese-iso-8859-1.inc.php b/lang/brazilian_portuguese-iso-8859-1.inc.php
index f61b9f82e..6cc371e2e 100644
--- a/lang/brazilian_portuguese-iso-8859-1.inc.php
+++ b/lang/brazilian_portuguese-iso-8859-1.inc.php
@@ -769,4 +769,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/brazilian_portuguese-utf-8.inc.php b/lang/brazilian_portuguese-utf-8.inc.php
index 82594e1bb..798b54d3c 100644
--- a/lang/brazilian_portuguese-utf-8.inc.php
+++ b/lang/brazilian_portuguese-utf-8.inc.php
@@ -770,4 +770,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/bulgarian-koi8-r.inc.php b/lang/bulgarian-koi8-r.inc.php
index 635e3b73c..d8ebf6726 100644
--- a/lang/bulgarian-koi8-r.inc.php
+++ b/lang/bulgarian-koi8-r.inc.php
@@ -752,4 +752,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/bulgarian-utf-8.inc.php b/lang/bulgarian-utf-8.inc.php
index a39cfc9ab..0f4214414 100644
--- a/lang/bulgarian-utf-8.inc.php
+++ b/lang/bulgarian-utf-8.inc.php
@@ -753,4 +753,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/bulgarian-windows-1251.inc.php b/lang/bulgarian-windows-1251.inc.php
index ccd096bc4..8914f9470 100644
--- a/lang/bulgarian-windows-1251.inc.php
+++ b/lang/bulgarian-windows-1251.inc.php
@@ -752,4 +752,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/catalan-iso-8859-1.inc.php b/lang/catalan-iso-8859-1.inc.php
index 97ce65d41..1c979c954 100644
--- a/lang/catalan-iso-8859-1.inc.php
+++ b/lang/catalan-iso-8859-1.inc.php
@@ -740,4 +740,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/catalan-utf-8.inc.php b/lang/catalan-utf-8.inc.php
index 2066a384c..7992de36d 100644
--- a/lang/catalan-utf-8.inc.php
+++ b/lang/catalan-utf-8.inc.php
@@ -741,4 +741,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/chinese_big5-utf-8.inc.php b/lang/chinese_big5-utf-8.inc.php
index b05d9e8f0..396235c5c 100644
--- a/lang/chinese_big5-utf-8.inc.php
+++ b/lang/chinese_big5-utf-8.inc.php
@@ -747,4 +747,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/chinese_big5.inc.php b/lang/chinese_big5.inc.php
index fbc3d7876..6a0e545ce 100644
--- a/lang/chinese_big5.inc.php
+++ b/lang/chinese_big5.inc.php
@@ -746,4 +746,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/chinese_gb-utf-8.inc.php b/lang/chinese_gb-utf-8.inc.php
index 85440b5e1..20f842615 100644
--- a/lang/chinese_gb-utf-8.inc.php
+++ b/lang/chinese_gb-utf-8.inc.php
@@ -747,4 +747,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/chinese_gb.inc.php b/lang/chinese_gb.inc.php
index 3d0608fa0..1d28e362b 100644
--- a/lang/chinese_gb.inc.php
+++ b/lang/chinese_gb.inc.php
@@ -746,4 +746,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/croatian-iso-8859-2.inc.php b/lang/croatian-iso-8859-2.inc.php
index 15574b948..63b08e5fc 100644
--- a/lang/croatian-iso-8859-2.inc.php
+++ b/lang/croatian-iso-8859-2.inc.php
@@ -768,4 +768,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/croatian-utf-8.inc.php b/lang/croatian-utf-8.inc.php
index a4f09674e..57ca15626 100644
--- a/lang/croatian-utf-8.inc.php
+++ b/lang/croatian-utf-8.inc.php
@@ -769,4 +769,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/croatian-windows-1250.inc.php b/lang/croatian-windows-1250.inc.php
index ccd9f8ea0..88d572a5e 100644
--- a/lang/croatian-windows-1250.inc.php
+++ b/lang/croatian-windows-1250.inc.php
@@ -768,4 +768,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/czech-iso-8859-2.inc.php b/lang/czech-iso-8859-2.inc.php
index 48e85b09c..b6c30ec4a 100644
--- a/lang/czech-iso-8859-2.inc.php
+++ b/lang/czech-iso-8859-2.inc.php
@@ -630,7 +630,7 @@ $strSize = 'Velikost';
$strSort = 'Řadit';
$strSortByKey = 'Setřídit podle klíče';
$strSpaceUsage = 'Využití místa';
-$strSpanish = 'Španělsky;
+$strSpanish = 'Španělsky';
$strSplitWordsWithSpace = 'Slova jsou oddělena mezerou (" ").';
$strStatCheckTime = 'Poslední kontrola';
$strStatCreateTime = 'Vytvoření';
@@ -641,6 +641,7 @@ $strStrucCSV = 'CSV data';
$strStrucData = 'Strukturu a data';
$strStrucDrop = 'Přidat \'DROP TABLE\'';
$strStrucExcelCSV = 'CSV data pro MS Excel';
+$strStrucNativeExcel = 'Nativní MS Excel';
$strStrucOnly = 'Pouze strukturu';
$strStructPropose = 'Navrhnout strukturu tabulky';
$strStructure = 'Struktura';
diff --git a/lang/czech-utf-8.inc.php b/lang/czech-utf-8.inc.php
index a4cdf0ae5..9c8ff9c47 100644
--- a/lang/czech-utf-8.inc.php
+++ b/lang/czech-utf-8.inc.php
@@ -631,7 +631,7 @@ $strSize = 'Velikost';
$strSort = 'Ĺadit';
$strSortByKey = 'SetĹĂdit podle klĂÄe';
$strSpaceUsage = 'VyuĹžitĂ mĂsta';
-$strSpanish = 'Ĺ panÄlsky;
+$strSpanish = 'Ĺ panÄlsky';
$strSplitWordsWithSpace = 'Slova jsou oddÄlena mezerou (" ").';
$strStatCheckTime = 'PoslednĂ kontrola';
$strStatCreateTime = 'VytvoĹenĂ';
@@ -642,6 +642,7 @@ $strStrucCSV = 'CSV data';
$strStrucData = 'Strukturu a data';
$strStrucDrop = 'PĹidat \'DROP TABLE\'';
$strStrucExcelCSV = 'CSV data pro MS Excel';
+$strStrucNativeExcel = 'NativnĂ MS Excel';
$strStrucOnly = 'Pouze strukturu';
$strStructPropose = 'Navrhnout strukturu tabulky';
$strStructure = 'Struktura';
diff --git a/lang/czech-windows-1250.inc.php b/lang/czech-windows-1250.inc.php
index 97f9d0f4b..2125c479c 100644
--- a/lang/czech-windows-1250.inc.php
+++ b/lang/czech-windows-1250.inc.php
@@ -630,7 +630,7 @@ $strSize = 'Velikost';
$strSort = 'Řadit';
$strSortByKey = 'Setřídit podle klíče';
$strSpaceUsage = 'Vyuití místa';
-$strSpanish = 'panělsky;
+$strSpanish = 'panělsky';
$strSplitWordsWithSpace = 'Slova jsou oddělena mezerou (" ").';
$strStatCheckTime = 'Poslední kontrola';
$strStatCreateTime = 'Vytvoření';
@@ -641,6 +641,7 @@ $strStrucCSV = 'CSV data';
$strStrucData = 'Strukturu a data';
$strStrucDrop = 'Přidat \'DROP TABLE\'';
$strStrucExcelCSV = 'CSV data pro MS Excel';
+$strStrucNativeExcel = 'Nativní MS Excel';
$strStrucOnly = 'Pouze strukturu';
$strStructPropose = 'Navrhnout strukturu tabulky';
$strStructure = 'Struktura';
diff --git a/lang/danish-iso-8859-1.inc.php b/lang/danish-iso-8859-1.inc.php
index fe955f260..67c605538 100644
--- a/lang/danish-iso-8859-1.inc.php
+++ b/lang/danish-iso-8859-1.inc.php
@@ -742,4 +742,5 @@ $strZeroRemovesTheLimit = 'Bem
$strZip = '"zipped"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/danish-utf-8.inc.php b/lang/danish-utf-8.inc.php
index 66e3ed588..f984b8725 100644
--- a/lang/danish-utf-8.inc.php
+++ b/lang/danish-utf-8.inc.php
@@ -743,4 +743,5 @@ $strZeroRemovesTheLimit = 'BemĂŚrk: Indstilling af disse vĂŚrdier til 0 (nul) fj
$strZip = '"zipped"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/dutch-iso-8859-1.inc.php b/lang/dutch-iso-8859-1.inc.php
index 034ab11a4..981f530a5 100644
--- a/lang/dutch-iso-8859-1.inc.php
+++ b/lang/dutch-iso-8859-1.inc.php
@@ -748,4 +748,5 @@ $strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/dutch-utf-8.inc.php b/lang/dutch-utf-8.inc.php
index ceeea86cd..6c9853863 100644
--- a/lang/dutch-utf-8.inc.php
+++ b/lang/dutch-utf-8.inc.php
@@ -749,4 +749,5 @@ $strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/english-iso-8859-1.inc.php b/lang/english-iso-8859-1.inc.php
index e0626f0ca..d82e8cd71 100644
--- a/lang/english-iso-8859-1.inc.php
+++ b/lang/english-iso-8859-1.inc.php
@@ -740,4 +740,5 @@ $strZeroRemovesTheLimit = 'Note: Setting these options to 0 (zero) removes the l
$strZip = '"zipped"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/english-utf-8.inc.php b/lang/english-utf-8.inc.php
index 1559c4b3a..696119c8b 100644
--- a/lang/english-utf-8.inc.php
+++ b/lang/english-utf-8.inc.php
@@ -741,4 +741,5 @@ $strZeroRemovesTheLimit = 'Note: Setting these options to 0 (zero) removes the l
$strZip = '"zipped"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/estonian-iso-8859-1.inc.php b/lang/estonian-iso-8859-1.inc.php
index 0da24541b..5fdcf8570 100644
--- a/lang/estonian-iso-8859-1.inc.php
+++ b/lang/estonian-iso-8859-1.inc.php
@@ -740,4 +740,5 @@ $strZeroRemovesTheLimit = 'M
$strZip = '"zipitud"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/estonian-utf-8.inc.php b/lang/estonian-utf-8.inc.php
index 0d41a94b3..882cc4d0b 100644
--- a/lang/estonian-utf-8.inc.php
+++ b/lang/estonian-utf-8.inc.php
@@ -741,4 +741,5 @@ $strZeroRemovesTheLimit = 'Märkus: Märkides antud seaded 0 (null) , eemaldate
$strZip = '"zipitud"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/finnish-iso-8859-1.inc.php b/lang/finnish-iso-8859-1.inc.php
index b73d9a877..a44dd8f4a 100644
--- a/lang/finnish-iso-8859-1.inc.php
+++ b/lang/finnish-iso-8859-1.inc.php
@@ -765,4 +765,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/finnish-utf-8.inc.php b/lang/finnish-utf-8.inc.php
index 0ed2aa36e..65090821f 100644
--- a/lang/finnish-utf-8.inc.php
+++ b/lang/finnish-utf-8.inc.php
@@ -766,4 +766,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/french-iso-8859-1.inc.php b/lang/french-iso-8859-1.inc.php
index 3d03d928c..d70d8cf1e 100644
--- a/lang/french-iso-8859-1.inc.php
+++ b/lang/french-iso-8859-1.inc.php
@@ -741,4 +741,5 @@ $strYes = 'Oui';
$strZeroRemovesTheLimit = 'Note: Une valeur de 0 (zero) enlčve la limite.';
$strZip = '"zippé"';
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/french-utf-8.inc.php b/lang/french-utf-8.inc.php
index 8e3543b86..7c13829eb 100644
--- a/lang/french-utf-8.inc.php
+++ b/lang/french-utf-8.inc.php
@@ -742,4 +742,5 @@ $strYes = 'Oui';
$strZeroRemovesTheLimit = 'Note: Une valeur de 0 (zero) enlève la limite.';
$strZip = '"zippĂŠ"';
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/galician-iso-8859-1.inc.php b/lang/galician-iso-8859-1.inc.php
index d7ab48862..1038cb4db 100644
--- a/lang/galician-iso-8859-1.inc.php
+++ b/lang/galician-iso-8859-1.inc.php
@@ -747,4 +747,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/galician-utf-8.inc.php b/lang/galician-utf-8.inc.php
index 7a907780c..df893c8c4 100644
--- a/lang/galician-utf-8.inc.php
+++ b/lang/galician-utf-8.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/georgian-utf-8.inc.php b/lang/georgian-utf-8.inc.php
index ca35c6e00..f4aa06523 100644
--- a/lang/georgian-utf-8.inc.php
+++ b/lang/georgian-utf-8.inc.php
@@ -769,4 +769,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/german-iso-8859-1.inc.php b/lang/german-iso-8859-1.inc.php
index 99e9fec03..29f1ebf30 100644
--- a/lang/german-iso-8859-1.inc.php
+++ b/lang/german-iso-8859-1.inc.php
@@ -748,4 +748,5 @@ $strYes = 'Ja';
$strZeroRemovesTheLimit = 'Anmerkung: Der Wert 0 (null) entfernt die Beschränkung.';
$strZip = 'Zip-komprimiert';
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/german-utf-8.inc.php b/lang/german-utf-8.inc.php
index 8378215fe..870e048d8 100644
--- a/lang/german-utf-8.inc.php
+++ b/lang/german-utf-8.inc.php
@@ -749,4 +749,5 @@ $strYes = 'Ja';
$strZeroRemovesTheLimit = 'Anmerkung: Der Wert 0 (null) entfernt die Beschränkung.';
$strZip = 'Zip-komprimiert';
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/greek-iso-8859-7.inc.php b/lang/greek-iso-8859-7.inc.php
index 2df460c4c..00246b510 100644
--- a/lang/greek-iso-8859-7.inc.php
+++ b/lang/greek-iso-8859-7.inc.php
@@ -749,4 +749,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/greek-utf-8.inc.php b/lang/greek-utf-8.inc.php
index b8b10d061..a914fd94d 100644
--- a/lang/greek-utf-8.inc.php
+++ b/lang/greek-utf-8.inc.php
@@ -750,4 +750,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/hebrew-iso-8859-8-i.inc.php b/lang/hebrew-iso-8859-8-i.inc.php
index e8a96097a..7a117b9e4 100644
--- a/lang/hebrew-iso-8859-8-i.inc.php
+++ b/lang/hebrew-iso-8859-8-i.inc.php
@@ -765,4 +765,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/hindi-utf-8.inc.php b/lang/hindi-utf-8.inc.php
index 94f6a8e35..9791a158a 100644
--- a/lang/hindi-utf-8.inc.php
+++ b/lang/hindi-utf-8.inc.php
@@ -773,4 +773,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/hungarian-iso-8859-2.inc.php b/lang/hungarian-iso-8859-2.inc.php
index fd74ec9ac..d8a435c42 100644
--- a/lang/hungarian-iso-8859-2.inc.php
+++ b/lang/hungarian-iso-8859-2.inc.php
@@ -753,4 +753,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/hungarian-utf-8.inc.php b/lang/hungarian-utf-8.inc.php
index c4399b721..27dd03538 100644
--- a/lang/hungarian-utf-8.inc.php
+++ b/lang/hungarian-utf-8.inc.php
@@ -754,4 +754,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/indonesian-iso-8859-1.inc.php b/lang/indonesian-iso-8859-1.inc.php
index 7393ebbad..e81d08acd 100644
--- a/lang/indonesian-iso-8859-1.inc.php
+++ b/lang/indonesian-iso-8859-1.inc.php
@@ -740,4 +740,5 @@ $strZeroRemovesTheLimit = 'Perhatian: Perubahan pilihan ini ke posisi 0 (zero) a
$strZip = '"Dikompress dengan Zip"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/indonesian-utf-8.inc.php b/lang/indonesian-utf-8.inc.php
index ac3d3e5e3..e9ab2df1e 100644
--- a/lang/indonesian-utf-8.inc.php
+++ b/lang/indonesian-utf-8.inc.php
@@ -741,4 +741,5 @@ $strZeroRemovesTheLimit = 'Perhatian: Perubahan pilihan ini ke posisi 0 (zero) a
$strZip = '"Dikompress dengan Zip"';
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/italian-iso-8859-1.inc.php b/lang/italian-iso-8859-1.inc.php
index 014a7a908..2728a4927 100644
--- a/lang/italian-iso-8859-1.inc.php
+++ b/lang/italian-iso-8859-1.inc.php
@@ -745,4 +745,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/italian-utf-8.inc.php b/lang/italian-utf-8.inc.php
index f1c9a1598..50efb5337 100644
--- a/lang/italian-utf-8.inc.php
+++ b/lang/italian-utf-8.inc.php
@@ -746,4 +746,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/japanese-euc.inc.php b/lang/japanese-euc.inc.php
index f4bd8034a..c0047696c 100644
--- a/lang/japanese-euc.inc.php
+++ b/lang/japanese-euc.inc.php
@@ -753,4 +753,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/japanese-sjis.inc.php b/lang/japanese-sjis.inc.php
index be0f8b8e4..c4fbb6f38 100644
--- a/lang/japanese-sjis.inc.php
+++ b/lang/japanese-sjis.inc.php
@@ -753,4 +753,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/japanese-utf-8.inc.php b/lang/japanese-utf-8.inc.php
index cff169928..15570a19e 100644
--- a/lang/japanese-utf-8.inc.php
+++ b/lang/japanese-utf-8.inc.php
@@ -754,4 +754,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/korean-euc-kr.inc.php b/lang/korean-euc-kr.inc.php
index edb91d7e8..9b5682cbc 100644
--- a/lang/korean-euc-kr.inc.php
+++ b/lang/korean-euc-kr.inc.php
@@ -763,4 +763,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/korean-utf-8.inc.php b/lang/korean-utf-8.inc.php
index 69ef7e91d..8fb621a6a 100644
--- a/lang/korean-utf-8.inc.php
+++ b/lang/korean-utf-8.inc.php
@@ -764,4 +764,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/latvian-utf-8.inc.php b/lang/latvian-utf-8.inc.php
index 26443b769..f00383549 100644
--- a/lang/latvian-utf-8.inc.php
+++ b/lang/latvian-utf-8.inc.php
@@ -746,4 +746,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/latvian-windows-1257.inc.php b/lang/latvian-windows-1257.inc.php
index 72a6bbdff..600365975 100644
--- a/lang/latvian-windows-1257.inc.php
+++ b/lang/latvian-windows-1257.inc.php
@@ -745,4 +745,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/lithuanian-utf-8.inc.php b/lang/lithuanian-utf-8.inc.php
index 015fb49a5..b0a64f14a 100644
--- a/lang/lithuanian-utf-8.inc.php
+++ b/lang/lithuanian-utf-8.inc.php
@@ -741,4 +741,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/lithuanian-windows-1257.inc.php b/lang/lithuanian-windows-1257.inc.php
index af7740726..ba22aa227 100644
--- a/lang/lithuanian-windows-1257.inc.php
+++ b/lang/lithuanian-windows-1257.inc.php
@@ -740,4 +740,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/malay-iso-8859-1.inc.php b/lang/malay-iso-8859-1.inc.php
index 254be2028..2c61bd270 100644
--- a/lang/malay-iso-8859-1.inc.php
+++ b/lang/malay-iso-8859-1.inc.php
@@ -764,4 +764,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/malay-utf-8.inc.php b/lang/malay-utf-8.inc.php
index d25f0b0b7..a4e29cce6 100644
--- a/lang/malay-utf-8.inc.php
+++ b/lang/malay-utf-8.inc.php
@@ -765,4 +765,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/norwegian-iso-8859-1.inc.php b/lang/norwegian-iso-8859-1.inc.php
index 01d89f8c2..6bd266b8d 100644
--- a/lang/norwegian-iso-8859-1.inc.php
+++ b/lang/norwegian-iso-8859-1.inc.php
@@ -747,4 +747,5 @@ $strZip = 'Komprimert (zip)';
// To translate:
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/norwegian-utf-8.inc.php b/lang/norwegian-utf-8.inc.php
index 88827cdcb..45310285d 100644
--- a/lang/norwegian-utf-8.inc.php
+++ b/lang/norwegian-utf-8.inc.php
@@ -748,4 +748,5 @@ $strZip = 'Komprimert (zip)';
// To translate:
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/persian-utf-8.inc.php b/lang/persian-utf-8.inc.php
index ba6e8ec52..8dad5b240 100644
--- a/lang/persian-utf-8.inc.php
+++ b/lang/persian-utf-8.inc.php
@@ -771,4 +771,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/persian-windows-1256.inc.php b/lang/persian-windows-1256.inc.php
index 8fe109f8f..984e760de 100644
--- a/lang/persian-windows-1256.inc.php
+++ b/lang/persian-windows-1256.inc.php
@@ -770,4 +770,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/polish-iso-8859-2.inc.php b/lang/polish-iso-8859-2.inc.php
index 9b74301ab..3e1c400f4 100644
--- a/lang/polish-iso-8859-2.inc.php
+++ b/lang/polish-iso-8859-2.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/polish-utf-8.inc.php b/lang/polish-utf-8.inc.php
index 07841ba0d..45b6886b1 100644
--- a/lang/polish-utf-8.inc.php
+++ b/lang/polish-utf-8.inc.php
@@ -749,4 +749,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/portuguese-iso-8859-1.inc.php b/lang/portuguese-iso-8859-1.inc.php
index 1f75e59d3..628e0d29a 100644
--- a/lang/portuguese-iso-8859-1.inc.php
+++ b/lang/portuguese-iso-8859-1.inc.php
@@ -760,4 +760,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/portuguese-utf-8.inc.php b/lang/portuguese-utf-8.inc.php
index 4d0eefaad..887d019c9 100644
--- a/lang/portuguese-utf-8.inc.php
+++ b/lang/portuguese-utf-8.inc.php
@@ -761,4 +761,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/romanian-iso-8859-1.inc.php b/lang/romanian-iso-8859-1.inc.php
index cc3c6b283..0a68fcf92 100644
--- a/lang/romanian-iso-8859-1.inc.php
+++ b/lang/romanian-iso-8859-1.inc.php
@@ -741,4 +741,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/romanian-utf-8.inc.php b/lang/romanian-utf-8.inc.php
index a66dc8b38..01c551596 100644
--- a/lang/romanian-utf-8.inc.php
+++ b/lang/romanian-utf-8.inc.php
@@ -742,4 +742,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/russian-cp-866.inc.php b/lang/russian-cp-866.inc.php
index 07125707f..81cae3597 100644
--- a/lang/russian-cp-866.inc.php
+++ b/lang/russian-cp-866.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/russian-koi8-r.inc.php b/lang/russian-koi8-r.inc.php
index a9652433c..51e3c47b2 100644
--- a/lang/russian-koi8-r.inc.php
+++ b/lang/russian-koi8-r.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/russian-utf-8.inc.php b/lang/russian-utf-8.inc.php
index 2b9f6663a..f8567dfcc 100644
--- a/lang/russian-utf-8.inc.php
+++ b/lang/russian-utf-8.inc.php
@@ -749,4 +749,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/russian-windows-1251.inc.php b/lang/russian-windows-1251.inc.php
index 48d168cd7..d27a21e4e 100644
--- a/lang/russian-windows-1251.inc.php
+++ b/lang/russian-windows-1251.inc.php
@@ -748,4 +748,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/serbian_cyrillic-utf-8.inc.php b/lang/serbian_cyrillic-utf-8.inc.php
index cd12ca0ea..e35a25df2 100644
--- a/lang/serbian_cyrillic-utf-8.inc.php
+++ b/lang/serbian_cyrillic-utf-8.inc.php
@@ -751,4 +751,5 @@ $strRefresh = 'Refresh'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/serbian_cyrillic-windows-1251.inc.php b/lang/serbian_cyrillic-windows-1251.inc.php
index 63eef0330..6218f926d 100644
--- a/lang/serbian_cyrillic-windows-1251.inc.php
+++ b/lang/serbian_cyrillic-windows-1251.inc.php
@@ -750,4 +750,5 @@ $strRefresh = 'Refresh'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/serbian_latin-utf-8.inc.php b/lang/serbian_latin-utf-8.inc.php
index 63be541be..2613c5b15 100644
--- a/lang/serbian_latin-utf-8.inc.php
+++ b/lang/serbian_latin-utf-8.inc.php
@@ -751,4 +751,5 @@ $strRefresh = 'Refresh'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/serbian_latin-windows-1250.inc.php b/lang/serbian_latin-windows-1250.inc.php
index 9a2e7e090..9779af73c 100644
--- a/lang/serbian_latin-windows-1250.inc.php
+++ b/lang/serbian_latin-windows-1250.inc.php
@@ -750,4 +750,5 @@ $strRefresh = 'Refresh'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/slovak-iso-8859-2.inc.php b/lang/slovak-iso-8859-2.inc.php
index e34cbfb2c..b715af4f2 100644
--- a/lang/slovak-iso-8859-2.inc.php
+++ b/lang/slovak-iso-8859-2.inc.php
@@ -742,4 +742,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/slovak-utf-8.inc.php b/lang/slovak-utf-8.inc.php
index e222aa1ab..62eb7f1cf 100644
--- a/lang/slovak-utf-8.inc.php
+++ b/lang/slovak-utf-8.inc.php
@@ -743,4 +743,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/slovak-windows-1250.inc.php b/lang/slovak-windows-1250.inc.php
index 59012e7ed..2d9292d7e 100644
--- a/lang/slovak-windows-1250.inc.php
+++ b/lang/slovak-windows-1250.inc.php
@@ -742,4 +742,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/slovenian-iso-8859-2.inc.php b/lang/slovenian-iso-8859-2.inc.php
index e60f7af73..09929f99d 100644
--- a/lang/slovenian-iso-8859-2.inc.php
+++ b/lang/slovenian-iso-8859-2.inc.php
@@ -742,4 +742,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/slovenian-utf-8.inc.php b/lang/slovenian-utf-8.inc.php
index 5e83f870c..acede572e 100644
--- a/lang/slovenian-utf-8.inc.php
+++ b/lang/slovenian-utf-8.inc.php
@@ -743,4 +743,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/slovenian-windows-1250.inc.php b/lang/slovenian-windows-1250.inc.php
index ec2dac128..d60bf10d5 100644
--- a/lang/slovenian-windows-1250.inc.php
+++ b/lang/slovenian-windows-1250.inc.php
@@ -742,4 +742,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/spanish-iso-8859-1.inc.php b/lang/spanish-iso-8859-1.inc.php
index 719948851..a0c795350 100644
--- a/lang/spanish-iso-8859-1.inc.php
+++ b/lang/spanish-iso-8859-1.inc.php
@@ -744,4 +744,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/spanish-utf-8.inc.php b/lang/spanish-utf-8.inc.php
index 3aac4e578..fe6d7e80c 100644
--- a/lang/spanish-utf-8.inc.php
+++ b/lang/spanish-utf-8.inc.php
@@ -745,4 +745,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/swedish-iso-8859-1.inc.php b/lang/swedish-iso-8859-1.inc.php
index 3fbcd42f1..2885f6179 100644
--- a/lang/swedish-iso-8859-1.inc.php
+++ b/lang/swedish-iso-8859-1.inc.php
@@ -740,4 +740,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/swedish-utf-8.inc.php b/lang/swedish-utf-8.inc.php
index ea30e1f2b..257ac1d48 100644
--- a/lang/swedish-utf-8.inc.php
+++ b/lang/swedish-utf-8.inc.php
@@ -741,4 +741,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/thai-tis-620.inc.php b/lang/thai-tis-620.inc.php
index 38714a391..b1dad00b2 100644
--- a/lang/thai-tis-620.inc.php
+++ b/lang/thai-tis-620.inc.php
@@ -753,4 +753,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/thai-utf-8.inc.php b/lang/thai-utf-8.inc.php
index 8c9f2e0bd..579f564ef 100644
--- a/lang/thai-utf-8.inc.php
+++ b/lang/thai-utf-8.inc.php
@@ -754,4 +754,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/turkish-iso-8859-9.inc.php b/lang/turkish-iso-8859-9.inc.php
index 5501325c8..5d43d5052 100644
--- a/lang/turkish-iso-8859-9.inc.php
+++ b/lang/turkish-iso-8859-9.inc.php
@@ -753,4 +753,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/turkish-utf-8.inc.php b/lang/turkish-utf-8.inc.php
index 66a2b123e..32b096950 100644
--- a/lang/turkish-utf-8.inc.php
+++ b/lang/turkish-utf-8.inc.php
@@ -754,4 +754,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/ukrainian-utf-8.inc.php b/lang/ukrainian-utf-8.inc.php
index 0933d2f6b..3d3902801 100644
--- a/lang/ukrainian-utf-8.inc.php
+++ b/lang/ukrainian-utf-8.inc.php
@@ -746,4 +746,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/lang/ukrainian-windows-1251.inc.php b/lang/ukrainian-windows-1251.inc.php
index 9e1bf5d4c..8a44d9597 100644
--- a/lang/ukrainian-windows-1251.inc.php
+++ b/lang/ukrainian-windows-1251.inc.php
@@ -745,4 +745,5 @@ $strDefragment = 'Defragment table'; //to translate
$strNoRowsSelected = 'No rows selected'; //to translate
$strSQPBugSyntaxError = 'Syntax error'; //to translate
$strSpanish = 'Spanish'; //to translate
+$strStrucNativeExcel = 'Native MS Excel data'; //to translate
?>
diff --git a/libraries/config_import.lib.php b/libraries/config_import.lib.php
index e834a6e5f..7baed5e57 100644
--- a/libraries/config_import.lib.php
+++ b/libraries/config_import.lib.php
@@ -871,6 +871,11 @@ if (!isset($cfg['docSQLDir'])) {
$cfg['docSQLDir'] = '';
}
+if (!isset($cfg['TempDir'])) {
+ $cfg['TempDir'] = '';
+}
+
+
if (!isset($cfg['SQLValidator']['use'])) {
$cfg['SQLValidator']['use'] = FALSE;
}
@@ -1192,9 +1197,13 @@ if (!isset($cfg['CtrlArrowsMoving'])) {
$cfg['CtrlArrowsMoving'] = TRUE;
}
+if (!isset($cfg['Export'])) {
+ $cfg['Export'] = array();
+}
+
if (!isset($cfg['Export']['format'])) {
$cfg['Export']['format'] = 'sql';
-} // sql/latex/excel/csv/xml
+} // sql/latex/excel/csv/xml/xls
if (!isset($cfg['Export']['compression'])) {
$cfg['Export']['compression'] = 'none';
} // none/zip/gzip/bzip2
@@ -1217,6 +1226,12 @@ if (!isset($cfg['Export']['csv_null'])) {
if (!isset($cfg['Export']['csv_columns'])) {
$cfg['Export']['csv_columns'] = FALSE;
}
+if (!isset($cfg['Export']['xls_null'])) {
+ $cfg['Export']['xls_null'] = 'NULL';
+}
+if (!isset($cfg['Export']['xls_columns'])) {
+ $cfg['Export']['xls_columns'] = FALSE;
+}
if (!isset($cfg['Export']['excel_null'])) {
$cfg['Export']['excel_null'] = 'NULL';
}
diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php
index 363095fb3..5c16df1ad 100644
--- a/libraries/display_export.lib.php
+++ b/libraries/display_export.lib.php
@@ -6,6 +6,18 @@
require_once('./libraries/relation.lib.php');
$cfgRelation = PMA_getRelationsParam();
+// Check if we have native MS Excel export using PEAR class Spreadsheet_Excel_Writer
+if (!empty($GLOBALS['cfg']['TempDir'])) {
+ include_once('Spreadsheet/Excel/Writer.php');
+ if (class_exists('Spreadsheet_Excel_Writer')) {
+ $xls = TRUE;
+ } else {
+ $xls = FALSE;
+ }
+} else {
+ $xls = FALSE;
+}
+
function PMA_exportCheckboxCheck($str) {
if (isset($GLOBALS['cfg']['Export'][$str]) && $GLOBALS['cfg']['Export'][$str]) {
echo ' checked="checked"';
@@ -48,6 +60,9 @@ if (isset($sql_query)) {
getElement("csv_options").style.display = 'none';
getElement("excel_options").style.display = 'none';
getElement("latex_options").style.display = 'none';
+
+ getElement("xls_options").style.display = 'none';
+
getElement("sql_options").style.display = 'none';
@@ -58,6 +73,10 @@ if (isset($sql_query)) {
hide_them_all();
if (getElement('radio_dump_latex').checked) {
getElement('latex_options').style.display = 'block';
+
+ } else if (getElement('radio_dump_xls').checked) {
+ getElement('xls_options').style.display = 'block';
+
} else if (getElement('radio_dump_sql').checked) {
getElement('sql_options').style.display = 'block';
@@ -111,6 +130,14 @@ if (isset($sql_query)) {
+
+
+
+ />
+
+
+
+
/>
@@ -344,6 +371,31 @@ if ($cfgRelation['mimework']) {
+
+
+
+
+
+
+
+
+
+
diff --git a/libraries/export/xls.php b/libraries/export/xls.php
new file mode 100644
index 000000000..11c19d47b
--- /dev/null
+++ b/libraries/export/xls.php
@@ -0,0 +1,150 @@
+close();
+ if (!PMA_exportOutputHandler(file_get_contents($tmp_filename))) return FALSE;
+ unlink($tmp_filename);
+
+ return TRUE;
+}
+
+/**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+function PMA_exportHeader() {
+ global $workbook;
+ global $tmp_filename;
+
+ if (empty($GLOBALS['cfg']['TempDir'])) return FALSE;
+
+ $tmp_filename = tempnam($GLOBALS['cfg']['TempDir'], 'pma_xls_');
+ $workbook = new Spreadsheet_Excel_Writer($tmp_filename);
+
+ return TRUE;
+}
+
+/**
+ * Outputs database header
+ *
+ * @param string Database name
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+function PMA_exportDBHeader($db) {
+ return TRUE;
+}
+
+/**
+ * Outputs database footer
+ *
+ * @param string Database name
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+function PMA_exportDBFooter($db) {
+ return TRUE;
+}
+
+/**
+ * Outputs create database database
+ *
+ * @param string Database name
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+function PMA_exportDBCreate($db) {
+ return TRUE;
+}
+
+/**
+ * Outputs the content of a table in CSV format
+ *
+ * @param string the database name
+ * @param string the table name
+ * @param string the end of line sequence
+ * @param string the url to go back in case of error
+ * @param string SQL query for obtaining data
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ global $what;
+ global $workbook;
+
+ $worksheet =& $workbook->addWorksheet($table);
+
+ // Gets the data from the database
+ $result = PMA_DBI_query($sql_query, NULL, PMA_DBI_QUERY_UNBUFFERED);
+ $fields_cnt = PMA_DBI_num_fields($result);
+ $col = 0;
+
+ // If required, get fields name at the first line
+ if (isset($GLOBALS['xls_shownames']) && $GLOBALS['xls_shownames'] == 'yes') {
+ $schema_insert = '';
+ for ($i = 0; $i < $fields_cnt; $i++) {
+ $worksheet->write(0, $i, stripslashes(PMA_DBI_field_name($result, $i)));
+ } // end for
+ $col++;
+ } // end if
+
+ // Format the data
+ while ($row = PMA_DBI_fetch_row($result)) {
+ $schema_insert = '';
+ for ($j = 0; $j < $fields_cnt; $j++) {
+ if (!isset($row[$j]) || is_null($row[$j])) {
+ $worksheet->write($col, $j, $GLOBALS['xls_replace_null']);
+ } else if ($row[$j] == '0' || $row[$j] != '') {
+ // FIXME: we should somehow handle character set here!
+ $worksheet->write($col, $j, $row[$j]);
+ } else {
+ $worksheet->write($col, $j, '');
+ }
+ } // end for
+ $col++;
+ } // end while
+ PMA_DBI_free_result($result);
+
+ return TRUE;
+}
+?>