当前位置: 首页>>代码示例>>PHP>>正文


PHP Spreadsheet_Excel_Reader::raw方法代码示例

本文整理汇总了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] != "") {
开发者ID:nkiourt,项目名称:amacs,代码行数:31,代码来源:excel2amacs_syggros.php

示例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>
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:30,代码来源:mahima_export.php

示例3:

    ?>
	<tr>
	<?php 
    for ($col = 1; $col <= $xls->colcount(); $col++) {
        ?>
		<td><?php 
        echo $xls->val($row, $col);
        ?>
&nbsp;
		<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>
开发者ID:anasswoow,项目名称:coba,代码行数:30,代码来源:example.php


注:本文中的Spreadsheet_Excel_Reader::raw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。