From 01331ec9ece5b15d610bc989d7823f39eeb1990d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 5 Jun 2020 12:29:00 +0800 Subject: [PATCH] GnumericToExcel.php --- GnumericToExcel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GnumericToExcel.php b/GnumericToExcel.php index a5d0d0b9..ce965f75 100644 --- a/GnumericToExcel.php +++ b/GnumericToExcel.php @@ -91,7 +91,7 @@ class Pman_Core_GnumericToExcel extends Pman $ss = System::which('ssconvert'); $cmd = $xvfb . " -a " . $ss. " --import-encoding=Gnumeric_XmlIO:sax" . - " --export-type=Gnumeric_Excel:excel_biff8 " . + " --export-type={$outfmt} " . $srcTmp . ' ' . $targetTmp . ' 2>&1'; // echo $cmd; //passthru($cmd);exit; @@ -109,7 +109,7 @@ class Pman_Core_GnumericToExcel extends Pman } $fname .= preg_match('/\.xls/i', $fname) ? '' : '.xls'; // make sure it ends in xls.. - header('Content-type: application/vnd.ms-excel'); + header('Content-type: ' . $mime); header('Content-Disposition: attachment; filename="' .addslashes($fname). '"'); header('Content-length: '. filesize($targetTmp)); header("Content-Transfer-Encoding: binary"); -- 2.39.2