mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
use replacement for PHPExcel() which is outdated for a long time, create xlsx instead of xls
This commit is contained in:
parent
74003313e8
commit
20dd55840e
|
@ -67,7 +67,7 @@ class SeedDMS_Download_Mgr {
|
|||
|
||||
public function createToc($file) { /* {{{ */
|
||||
$items = $this->items;
|
||||
$objPHPExcel = new PHPExcel();
|
||||
$objPHPExcel = new PhpOffice\PhpSpreadsheet\Spreadsheet();
|
||||
$objPHPExcel->getProperties()->setCreator("SeedDMS")->setTitle("Metadata");
|
||||
$sheet = $objPHPExcel->setActiveSheetIndex(0);
|
||||
|
||||
|
@ -163,7 +163,7 @@ class SeedDMS_Download_Mgr {
|
|||
$i++;
|
||||
}
|
||||
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
|
||||
$objWriter = new PhpOffice\PhpSpreadsheet\Writer\Xlsx($objPHPExcel);
|
||||
$objWriter->save($file);
|
||||
|
||||
return true;
|
||||
|
@ -204,7 +204,7 @@ class SeedDMS_Download_Mgr {
|
|||
$zip->addFile($dms->contentDir.$item->getPath(), utf8_decode($filename));
|
||||
}
|
||||
|
||||
$zip->addFile($file, $prefixdir."/metadata.xls");
|
||||
$zip->addFile($file, $prefixdir."/metadata.xlsx");
|
||||
$zip->close();
|
||||
unlink($file);
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user