Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dungphanxuan/e14d63c2a8c593a26b16f30b2cbc68dd to your computer and use it in GitHub Desktop.
Save dungphanxuan/e14d63c2a8c593a26b16f30b2cbc68dd to your computer and use it in GitHub Desktop.
<!doctype>
<html>
<head>
</head>
<body>
<?php
require_once "Classes/PHPExcel.php";
$tmpfname = "test.xlsx";
$excelReader = PHPExcel_IOFactory::createReaderForFile($tmpfname);
$excelObj = $excelReader->load($tmpfname);
$worksheet = $excelObj->getSheet(0);
$lastRow = $worksheet->getHighestRow();
echo "<table>";
for ($row = 1; $row <= $lastRow; $row++) {
echo "<tr><td>";
echo $worksheet->getCell('A'.$row)->getValue();
echo "</td><td>";
echo $worksheet->getCell('B'.$row)->getValue();
echo "</td><tr>";
}
echo "</table>";
?>
</body>
</html>
@gokuldasvattamala
Copy link

how add library in laravel ??? plz mention steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment