本文整理汇总了PHP中Spreadsheet_Excel_Reader::bold方法的典型用法代码示例。如果您正苦于以下问题:PHP Spreadsheet_Excel_Reader::bold方法的具体用法?PHP Spreadsheet_Excel_Reader::bold怎么用?PHP Spreadsheet_Excel_Reader::bold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spreadsheet_Excel_Reader
的用法示例。
在下文中一共展示了Spreadsheet_Excel_Reader::bold方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
for ($row = 5; $row <= $data->rowcount(); $row++) {
if ($data->format($row, 3) != "") {
$arr_test = explode(" ", $data->format($row, 3));
$uom = str_replace('"', "", $arr_test[1]);
if (!in_array($uom, $unit_master)) {
$unit_master[] = $uom;
}
}
}
foreach ($unit_master as $unit_name) {
$sql_unit_master = "insert into ms_uom set\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname = '" . $unit_name . "'";
$result_ins = mysql_query($sql_unit_master) or die("Error in query:" . $sql_unit_master . "<br>" . mysql_error() . ":" . mysql_errno());
}
$dep_id = 0;
for ($row = 5; $row <= $data->rowcount(); $row++) {
if ($data->bold($row, 1, 0)) {
$sql_department = "insert into ms_department set\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tname = '" . $data->value($row, 1, 0) . "'";
$result_ins = mysql_query($sql_department) or die("Error in query:" . $sql_department . "<br>" . mysql_error() . ":" . mysql_errno());
$dep_id = mysql_insert_id();
} else {
$unit_id = 0;
if ($data->format($row, 3) != "") {
$arr_test = explode(" ", $data->format($row, 3));
$uom = str_replace('"', "", $arr_test[1]);
}
$sql = "SELECT uom_id FROM ms_uom where name = '" . $uom . "'";
$result = mysql_query($sql) or die("Error in : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
if (mysql_num_rows($result) > 0) {
$row_1 = mysql_fetch_array($result);
$unit_id = $row_1['uom_id'];
}
示例2:
table.excel tbody td {
vertical-align:bottom;
}
table.excel tbody td {
padding: 0 3px;
border: 1px solid #EEEEEE;
}
</style>
</head>
<body>
<?
for ($row=5;$row<=$data->rowcount();$row++)
{
//for ($col=1;$col<=$xls->colcount();$col++) {
//echo $xls->val($row,$col); echo "-";
//echo $xls->raw($row,$col); echo "-";
//echo $sql_ins = "insert into ms_item_master set
// name='".$xls->val($row,1)."',
// opening_quantity = '".$xls->raw($row,2)."',
// uom_id='',
// opening_rate = '".$xls->raw($row,3)."'";
//}
}
?>
<?php
echo $data->bold(5, 1, $sheet = 0);
?>
</body>
</html>