本文整理匯總了PHP中convert::toexcel方法的典型用法代碼示例。如果您正苦於以下問題:PHP convert::toexcel方法的具體用法?PHP convert::toexcel怎麽用?PHP convert::toexcel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類convert
的用法示例。
在下文中一共展示了convert::toexcel方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
if (!empty($jobNumFrm) && empty($jobNumTom)) {
$condition = $condition . $andRule . " jobOrder_jobNum>=" . $jobNumFrm;
} else {
if (empty($jobNumFrm) && !empty($jobNumTom)) {
$condition = $condition . $andRule . " jobOrder_jobNum<=" . $jobNumTom;
} else {
$condition = $condition;
}
}
}
$xcelCondition = $condition . " ORDER BY jobOrder_jobNum ASC";
// excel file name
$filesname = "list_of_job_orders.xls";
// excel workbook sheet name
$sheetname = "list_of_job_orders";
$excel = convert::toexcel($filesname, $sheetname);
// for header
$infoHeader = array($header);
$excel->writeLine($infoHeader);
$whiteSpace = array("");
$excel->writeLine($whiteSpace);
$jo_dselect = "\r\n\t\t\t\t\t\t\tjoborder.jobOrder_id,\r\n\t\t\t\t\t\t\tjoborder.jobOrder_Branch,\r\n\t\t\t\t\t\t\tjoborder.jobOrder_clientNum,\r\n\t\t\t\t\t\t\tjoborder.jobOrder_jobNum";
$list = $pdo_sql->fetchAll($dbtable = "joborder", $jo_dselect, $xcelCondition);
$countList = $pdo_sql->count($dbtable = "joborder", $jo_dselect, $xcelCondition);
if (count($list) >= 1) {
$joListNum = '';
foreach ($list as $listKey => $listVal) {
// get the necessary data from the database
$jobOrderId = $listVal['jobOrder_id'];
$listBranch = $listVal['jobOrder_Branch'];
$listCnumber = $listVal['jobOrder_clientNum'];