From: Alan Knowles Date: Tue, 3 Aug 2021 03:47:36 +0000 (+0800) Subject: Fix #6910 - add extra column to shipping history report X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=08b1813f1699b2c2703810e6c57d3b693ce67dd5 Fix #6910 - add extra column to shipping history report --- 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"; }