From 08b1813f1699b2c2703810e6c57d3b693ce67dd5 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 3 Aug 2021 11:47:36 +0800 Subject: [PATCH] Fix #6910 - add extra column to shipping history report --- GnumericToExcel.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GnumericToExcel.php b/GnumericToExcel.php index a14633e7..5ce821de 100644 --- a/GnumericToExcel.php +++ b/GnumericToExcel.php @@ -66,7 +66,7 @@ class Pman_Core_GnumericToExcel extends Pman exit; } - $ext = '.xls'; + $ext = 'xls'; $outfmt = 'Gnumeric_Excel:excel_biff8'; $mime = 'application/vnd.ms-excel'; @@ -98,7 +98,7 @@ class Pman_Core_GnumericToExcel extends Pman " --export-type={$outfmt} " . $srcTmp . ' ' . $targetTmp . ' 2>&1'; // echo $cmd; - //passthru($cmd);exit; + //passthru($cmd);exit; //exit; $out = `$cmd`; clearstatcache(); @@ -111,8 +111,11 @@ class Pman_Core_GnumericToExcel extends Pman if (!empty($_POST['format']) && $_POST['format']=='xlsx') { require_once 'File/Convert.php'; $cc = new File_Convert($targetTmp,'application/vnd.ms-excel'); - $targetTmp = $cc->convert('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); + if (empty($targetTmp)) { + $this->jerr("convert to xlsx failed"); + } + $mime = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; $ext = "xlsx"; } -- 2.39.2