
 venkateshmallina - 2011-02-16 13:15:10
When the below code is exceuted , the XLS should be created with first row ("idPReq","Title","Created Date","HoFinance OK Date") but the values in the array doesnot get wrriten into the XLS
--------------------------------------------------------
include("lib/excelwriter.inc.php");
        /* Report Generation for Pending Purchase Requests STARTS*/
        $csvDir = $abspath. DIRECTORY_SEPARATOR . 'temp'. DIRECTORY_SEPARATOR . 'kpiexcel';
    $dateRand = date('Ymd_His_') . rand(1, 100);
    $csvprName = 'results_preqs_' . $dateRand  . '.xls';
        $excel = new ExcelWriter($csvDir . DIRECTORY_SEPARATOR . $csvprName);
        if($excel==false)
                echo $excel->error;
        $myArr=array("idPReq","Title","Created Date","HoFinance OK Date");
        if(isset($_GET['ttc']) && $_GET['ttc'] == 'yes'){
                        array_push($myArr,"Procurement OK Date","TTC in DAYS(Time To Closure)");
        }
        $excel->writeLine($myArr);
        exit();