} if (is_dir("printout/report/")) { } else { mkdir("printout/report/"); } $folder = "c:/report/"; $workbookname = "Dispatcher Update List - Generated "; $workbookname .= date("Y-m-d H.i.s") . ".xls"; $fileName = $workbookname; $workbookname = $folder . $workbookname; $excel = startCOMGiven(); $workSheetName = "Client Requests or Tasks"; // $excelClass=createExcelApplication($excel); // $ExWb=createWorkbook($excel,$workbookname,"create",$excelClass); // $ExWb=createWorkbook($excel,$workbookname,"create"); $ExWs = createWorksheet($excel, $workSheetName, $ExWb, "create"); /** $verify=$excel->fileExists($workbookname); if($verify=="true"){ $excel->deleteFile($workbookname); } */ // if(file_exists("c:/report/dotc.jpg")){ // } // else { // copy("dotc.jpg","c:/report/dotc.jpg"); // } addImage(setRange("a1", "b6"), $excel, "c:/report/records picture2.jpg", "true", $ExWs); $i = 0; //Create the Header addContent(setRange("a1", "b6"), $excel, "", "true", $ExWs);
$rs3=$db->query($sql3); $row3=$rs3->fetch_assoc(); $head=$row3['admin']; $position=$row3['position']; $newFilename="printout/Helpdesk Request_".$referenceNumber."_".$task_id.".xls"; copy($filename,$newFilename); $workSheetName="Helpdesk Form"; $workbookname=$newFilename; $excel=loadExistingWorkbook($workbookname); // $ExWb=createWorkbook($excel,$workbookname,"open",$excelClass); // $ExWb=createWorkbook($excel,$workbookname,"open");\ $ExWs=createWorksheet($excel,$workSheetName,"openActive"); addContent(setRange("c13","f13"),$excel,$client_name,"true",$ExWs); addContent(setRange("a45","e45"),$excel,strtoupper($client_name),"true",$ExWs); addContent(setRange("i13","j13"),$excel,$referenceNumber,"true",$ExWs); addContent(setRange("c14","f14"),$excel,$division,"true",$ExWs); addContent(setRange("c16","d16"),$excel,$unitType,"true",$ExWs); addContent(setRange("i16","j16"),$excel,$probConcern,"true",$ExWs); addContent(setRange("d17", "j22"),$excel,$problem_details,"true",$ExWs); addContent(setRange("d24", "f24"),$excel,date("F d, Y",strtotime($dispatch_time)),"true",$ExWs); addContent(setRange("i24", "j24"),$excel,date("h:ia",strtotime($dispatch_time)),"true",$ExWs); addContent(setRange("a52", "e52"),$excel,strtoupper($dispatch_staff),"true",$ExWs); addContent(setRange("f45", "j45"),$excel,strtoupper($head),"true",$ExWs); addContent(setRange("f46", "j49"),$excel,$position,"true",$ExWs); addContent(setRange("f52", "j52"),$excel,strtoupper($administrator),"true",$ExWs); addContent(setRange("f53", "j53"),$excel,$adminposition,"true",$ExWs);