本文整理汇总了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'];