X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=JsonToExcel.php;h=75a24fe85c76eae82211dc3bf41aac0697f09bb3;hp=830b0b4850280a673402199a00c6fba291f82143;hb=a1a3ecba68d2fedabc8203e88b40759401d7472d;hpb=644b4f5d952a512c86d61ce52131387c3315660f diff --git a/JsonToExcel.php b/JsonToExcel.php index 830b0b48..75a24fe8 100644 --- a/JsonToExcel.php +++ b/JsonToExcel.php @@ -28,7 +28,7 @@ class Pman_Core_JsonToExcel extends Pman return true; } - function get() + function get($v, $opts=array()) { $this->jerr("invalid get"); } @@ -71,9 +71,11 @@ class Pman_Core_JsonToExcel extends Pman } $workbook->close(); - - + require_once 'File/Convert.php'; + $fc= new File_Convert($outfile2, "application/vnd.ms-excel"); + $fn = $fc->convert("application/vnd.ms-excel"); + $fc->serve('attachment','excel-'.date('Y-m-d-H-i-s').'.xls'); // can fix IE Mess + unlink($outfile2); } - - + }