本文整理汇总了PHP中Spreadsheet_Excel_Reader::raw方法的典型用法代码示例。如果您正苦于以下问题:PHP Spreadsheet_Excel_Reader::raw方法的具体用法?PHP Spreadsheet_Excel_Reader::raw怎么用?PHP Spreadsheet_Excel_Reader::raw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spreadsheet_Excel_Reader
的用法示例。
在下文中一共展示了Spreadsheet_Excel_Reader::raw方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: iconv
echo "<table border=0 celspacing=0 cellpadding=0 id='exams_overview' class='display'><thead>\n";
echo "<tr><th>Excel A/A</th><th>Ημερομηνία (Excel)</th><th>Ημερομηνία (AMACS)</th><th>Εξέταση (Excel)</th><th>Εξέταση (AMACS)</th>";
echo "<th>Τιμή - Μονάδες (Excel)</th><th>Τιμή - Μονάδες (AMACS)</th><th>Lower</th><th>Upper</th></tr></thead><tbody>";
$x = 8;
$i = 0;
$converted_records_bio = 0;
while ($x <= $excel->sheets[0]['numRows']) {
// $date_cell = $excel->sheets[0]['cells'][$x][3];
$mysql_date = "";
$date_raw = "";
$date_cell = "";
$exam_cell = "";
$value_cell = "";
$lower_upper_cell = "";
$units_cell = "";
$date_raw = $excel->raw($x, 3);
$date_cell = $excel->val($x, 3);
$mysql_date = xls2mysql_date($date_raw);
$exam_cell = $excel->val($x, 5);
$value_cell = $excel->val($x, 8);
$lower_upper_cell = $excel->val($x, 11);
$units_cell = $excel->val($x, 9);
$units_encoding = "";
// "(".mb_detect_encoding($units_cell, 'ISO-8859-7', true).")";
if (mb_detect_encoding($units_cell, 'UTF-8', true) != 'UTF-8') {
$units_cell = iconv("ISO-8859-7", "UTF-8", $units_cell);
// Epeidi kapoies eggrafes einai ISO-8859-7 !!!
}
// $date_parts = explode("/", $date_cell);
$limits = explode(" - ", $lower_upper_cell);
if ($transformation_array_bio[$exam_cell] != "") {
示例2: die
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'];
}
$sql_item = "insert into ms_item_master set\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname = '" . addslashes($data->value($row, 1)) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdepartment_id = '" . $dep_id . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuom_id = '" . $unit_id . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topening_rate ='" . $data->raw($row, 4) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topening_quantity = '" . $data->raw($row, 3) . "'";
$result_ins = mysql_query($sql_item) or die("Error in query:" . $sql_item . "<br>" . mysql_error() . ":" . mysql_errno());
}
}
?>
<body>
</body>
</html>
示例3:
?>
<tr>
<?php
for ($col = 1; $col <= $xls->colcount(); $col++) {
?>
<td><?php
echo $xls->val($row, $col);
?>
<div><br>Format=<?php
echo $xls->format($row, $col);
?>
<br>FormatIndex=<?php
echo $xls->formatIndex($row, $col);
?>
<br>Raw=<?php
echo $xls->raw($row, $col);
?>
</div></td>
<?php
}
?>
</tr>
<?php
}
?>
</table>
</body>
</html>