Login   Register  
PHP Classes
elePHPant
Icontem

Created XLS but unable to write to the XLS .Just opening blank

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Excel Writer  >  All threads  >  Created XLS but unable to write to the XLS .Just opening blank  >  (Un) Subscribe thread alerts  
Subject:Created XLS but unable to write to the XLS .Just opening blank
Summary:XLS opening blank , don't know eaxct problem
Messages:1
Author:venkateshmallina
Date:2011-02-16 13:15:10
 

  1. Created XLS but unable to write to the XLS .Just opening blank   Reply   Report abuse  
Picture of venkateshmallina
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();