Explorar o código

Use real xls export instead of html table see BT#13187

jmontoyaa %!s(int64=7) %!d(string=hai) anos
pai
achega
57984f1327
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      main/inc/ajax/model.ajax.php

+ 3 - 1
main/inc/ajax/model.ajax.php

@@ -2203,6 +2203,9 @@ if (in_array($action, $allowed_actions)) {
 
 
         switch ($exportFormat) {
         switch ($exportFormat) {
             case 'xls':
             case 'xls':
+                Export::arrayToXls($array, $fileName);
+                break;
+            case 'xls_html':
                 //TODO add date if exists
                 //TODO add date if exists
                 $browser = new Browser();
                 $browser = new Browser();
                 if ($browser->getPlatform() == Browser::PLATFORM_WINDOWS) {
                 if ($browser->getPlatform() == Browser::PLATFORM_WINDOWS) {
@@ -2213,7 +2216,6 @@ if (in_array($action, $allowed_actions)) {
                 break;
                 break;
             case 'csv':
             case 'csv':
             default:
             default:
-                //TODO add date if exists
                 Export::arrayToCsv($array, $fileName);
                 Export::arrayToCsv($array, $fileName);
                 break;
                 break;
         }
         }