Fix export extension see BT#10139

1.10.x
Julio Montoya 11 years ago
parent ef371df086
commit 1082ae9ba0
  1. 7
      main/inc/lib/export.lib.inc.php

@ -26,6 +26,9 @@ use Symfony\Component\Filesystem\Filesystem;
*/
class Export
{
/**
* Constructor
*/
private function __construct()
{
}
@ -62,7 +65,7 @@ class Export
*/
public static function arrayToXls($data, $filename = 'export', $encoding = 'utf-8')
{
$filePath = api_get_path(SYS_ARCHIVE_PATH).uniqid('').'.xls';
$filePath = api_get_path(SYS_ARCHIVE_PATH).uniqid('').'.xlsx';
$file = new \SplFileObject($filePath, 'w');
$writer = new ExcelWriter($file);
@ -74,7 +77,7 @@ class Export
$writer->finish();
DocumentManager::file_send_for_download($filePath, true, $filename.'.xls');
DocumentManager::file_send_for_download($filePath, true, $filename.'.xlsx');
exit;
}

Loading…
Cancel
Save