projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8cd2a92
)
Changed GnumericToExcel.php
author
Alan Knowles
<alan@roojs.com>
Fri, 5 Jun 2020 04:26:21 +0000
(12:26 +0800)
committer
Alan Knowles
<alan@roojs.com>
Fri, 5 Jun 2020 04:26:21 +0000
(12:26 +0800)
GnumericToExcel.php
patch
|
blob
|
history
diff --git
a/GnumericToExcel.php
b/GnumericToExcel.php
index
cae4037
..
a5d0d0b
100644
(file)
--- a/
GnumericToExcel.php
+++ b/
GnumericToExcel.php
@@
-55,7
+55,7
@@
class Pman_Core_GnumericToExcel extends Pman
//$this->addEvent("DOWNLOAD", false, isset($_REQUEST['title']) ? $_REQUEST['title'] : '???');
//$this->addEvent("DOWNLOAD", false, isset($_REQUEST['title']) ? $_REQUEST['title'] : '???');
-
if (!empty($_POST['format']) && $_POST['format']=='gnumeric') {
+ if (!empty($_POST['format']) && $_POST['format']=='gnumeric') {
if (empty($_POST['debug'])) {
header('Content-type: application/x-gnumeric');
header('Content-Disposition: attachment; filename="' .addslashes($fname). '.gnumeric"');
if (empty($_POST['debug'])) {
header('Content-type: application/x-gnumeric');
header('Content-Disposition: attachment; filename="' .addslashes($fname). '.gnumeric"');
@@
-65,6
+65,18
@@
class Pman_Core_GnumericToExcel extends Pman
echo $xml;
exit;
}
echo $xml;
exit;
}
+
+ $ext = '.xls';
+ $outfmt = 'Gnumeric_Excel:excel_biff8';
+ $mime = 'application/vnd.ms-excel';
+ if (!empty($_POST['format']) && $_POST['format']=='xlsx') {
+ $outfmt = 'Gnumeric_Excel:xlsx';
+ $ext = '.xlsx';
+ $mime = 'aapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
+ }
+
+
+
$srcTmp = ini_get('session.save_path') . '/' .uniqid('gnumeric_').'.gnumeric';
$targetTmp = ini_get('session.save_path') . '/' .uniqid('gnumeric_').'.xls';
// write the gnumeric file...
$srcTmp = ini_get('session.save_path') . '/' .uniqid('gnumeric_').'.gnumeric';
$targetTmp = ini_get('session.save_path') . '/' .uniqid('gnumeric_').'.xls';
// write the gnumeric file...