function get_aim_data($excel) { $i = 0; $x = 8; $exceldata = array(); while ($x <= $excel->sheets[0]['numRows']) { $exceldata[$i] = array(); $exceldata[$i]['index'] = $x; $exceldata[$i]['date_raw'] = $excel->raw($x, 3); $exceldata[$i]['date_cell'] = $excel->val($x, 3); $exceldata[$i]['mysql_date'] = xls2mysql_date($exceldata[$i]['date_raw']); $exceldata[$i]['exam_cell'] = $excel->val($x, 5); $value_cell_orig = $excel->val($x, 8); $exceldata[$i]['value_cell'] = str_replace(">", "", $value_cell_orig); // $lower_upper_cell = $excel->val($x, 11); // $limits = explode(" - ", $lower_upper_cell); // $exceldata[$i]['lower'] = $limits[0]; // $exceldata[$i]['upper'] = $limits[1]; $units_cell = $excel->val($x, 9); 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 !!! } $exceldata[$i]['units_cell'] = $units_cell; $exceldata[$i]['units_encoding'] = ""; $x++; $i++; } return $exceldata; }
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></tr></thead><tbody>"; $x = 8; $converted_records_aim = 0; $amacs_aimatologikes = array(); while ($x <= $excel->sheets[0]['numRows']) { $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_orig = $excel->val($x, 8); $value_cell = str_replace(">", "", $value_cell_orig); $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 !!! } $limits = explode(" - ", $lower_upper_cell); if ($transformation_array_aim[$exam_cell] != "") { $amacs_aimatologikes[$mysql_date][$transformation_array_aim[$exam_cell]] = $value_cell * $units_transform_aim[$units_cell]['fix']; echo "<tr><td align=center>{$x}</td>"; //Print Date