require_once dirname(__FILE__)./*path to*/ . 'autoload.php';
//Đường dẫn file excel
$file = $path;
//Tiến hành xác thực file
$objFile = PHPExcel_IOFactory::identify($file);
$objData = PHPExcel_IOFactory::createReader($objFile);
//Chỉ đọc dữ liệu
$objData->setReadDataOnly(true);
// Load dữ liệu sang dạng đối tượng
$objPHPExcel = $objData->load($file);
//Lấy ra số trang sử dụng phương thức getSheetCount();
// Lấy Ra tên trang sử dụng getSheetNames();
//Chọn trang cần truy xuất
$sheet = $objPHPExcel->setActiveSheetIndex(0);
//Lấy ra số dòng cuối cùng
$Totalrow = $sheet->getHighestRow();
//Lấy ra tên cột cuối cùng
//$LastColumn = $sheet->getHighestColumn();
//Chuyển đổi tên cột đó về vị trí thứ, VD: C là 3,D là 4
//$TotalCol = PHPExcel_Cell::columnIndexFromString($LastColumn);
$d=0;
for ($i = 1; $i <= $Totalrow; $i++) {
$value=$sheet->getCellByColumnAndRow(0,$i)->getValue();
}//end for
https://tritue.edu.vn/tuecode/tracnghiem30/index.php/baiviet/post/view/id/159?id=159