Created
March 27, 2017 07:06
-
-
Save evilnapsis/4cbc5be14ba6f52799d6386ee82bc149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Leer Archivo Excel</title> | |
</head> | |
<body> | |
<h1>Leer Archivo Excel</h1> | |
<?php | |
require_once 'PHPExcel/Classes/PHPExcel.php'; | |
$archivo = "libro1.xlsx"; | |
$inputFileType = PHPExcel_IOFactory::identify($archivo); | |
$objReader = PHPExcel_IOFactory::createReader($inputFileType); | |
$objPHPExcel = $objReader->load($archivo); | |
$sheet = $objPHPExcel->getSheet(0); | |
$highestRow = $sheet->getHighestRow(); | |
$highestColumn = $sheet->getHighestColumn(); | |
for ($row = 2; $row <= $highestRow; $row++){ | |
echo $sheet->getCell("A".$row)->getValue()." - "; | |
echo $sheet->getCell("B".$row)->getValue()." - "; | |
echo $sheet->getCell("C".$row)->getValue(); | |
echo "<br>"; | |
} | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment