X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=GnumericToExcel.php;fp=GnumericToExcel.php;h=a14633e72ecd6216110d9923c5b527c66dc8835f;hp=527e103409ae8ee6cba9dfbea45032d911fcac25;hb=a23ef534e78ff4112469bc9f883f5de1aacfd83e;hpb=b645e610393300d301015f6adcfe78001a43389c diff --git a/GnumericToExcel.php b/GnumericToExcel.php index 527e1034..a14633e7 100644 --- a/GnumericToExcel.php +++ b/GnumericToExcel.php @@ -69,7 +69,10 @@ class Pman_Core_GnumericToExcel extends Pman $ext = '.xls'; $outfmt = 'Gnumeric_Excel:excel_biff8'; $mime = 'application/vnd.ms-excel'; - /* if (!empty($_POST['format']) && $_POST['format']=='xlsx') { + + /* + // ssconvert results in bad images + if (!empty($_POST['format']) && $_POST['format']=='xlsx') { $outfmt = 'Gnumeric_Excel:xlsx'; $ext = 'xlsx'; $mime = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; @@ -104,13 +107,14 @@ class Pman_Core_GnumericToExcel extends Pman header("HTTP/1.0 400 Internal Server Error - Convert error"); die("ERROR CONVERTING?:" . $cmd ."\n

OUTPUT:". htmlspecialchars($out)); } + 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'); - $mime = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; - $ext = ".xlsx"; + $mime = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; + $ext = "xlsx"; }