在批量导入时,读取格式后的值

dev
曾超新 5 years ago
parent fb0e0df5b2
commit 77d82331a3
  1. 10
      frontend/controllers/FinanceController.php

@ -6379,19 +6379,19 @@ class FinanceController extends \frontend\controllers\UserBaseController
for ($i = 2; $i <= $rowCount; $i++) {
// echo $i.'/'.$rowCount."...";
$cell = $currentSheet->getCellByColumnAndRow(0, $i);
$car_no = $cell->getValue();
$car_no = $cell->getFormattedValue();
// $cell = $currentSheet->getCellByColumnAndRow(1, $i);
// $car_man = $cell->getValue();
$cell = $currentSheet->getCellByColumnAndRow(1, $i);
$factory_model = $cell->getValue();//$data[$i][3];
$factory_model = $cell->getFormattedValue();//$data[$i][3];
$cell = $currentSheet->getCellByColumnAndRow(2, $i);
$engine_no = $cell->getValue();//$data[$i][2];
$engine_no = $cell->getFormattedValue();//$data[$i][2];
// var_dump($cars);
$cell = $currentSheet->getCellByColumnAndRow(3, $i);
$car_frame_no = $cell->getValue();//$data[$i][1];
$car_frame_no = $cell->getFormattedValue();//$data[$i][1];
// var_dump($car_frame_no);
$cell = $currentSheet->getCellByColumnAndRow(4, $i);
$register_date = $cell->getValue();//$data[$i][8];
$register_date = $cell->getFormattedValue();
$cell = $currentSheet->getCellByColumnAndRow(5, $i);
$company = $cell->getValue();//$data[$i][8];
$cell = $currentSheet->getCellByColumnAndRow(6, $i);

Loading…
Cancel
Save