Programación [Extracción de Datos de un Excel] [PHP]

in #busy3 years ago (edited)

Si eres de esa persona que quiere aprender a programar en aplicaciones Web
Aqui les traigo codigo sencillo para extraccion de datos de un archivo Excel mediante lenguaje de programacion PHP

php_elephant.png

CODIGO :


$archivo = "../Vista/Excel/excel.xls";
$inputFileType = PHPExcel_IOFactory::identify($archivo);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel2 = $objReader->load($archivo);
$sheet = $objPHPExcel2->getSheet(0);
$highestRow = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();


        for ($row = 1 ; $row <= $highestRow; $row++){ 

                   $cedula = $sheet->getCell("A".$row)->getValue();
                   $nombre = $sheet->getCell("B".$row)->getValue();
                   $monto = $sheet->getCell("C".$row)->getValue();
Sort:  

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by arevaloarcadio from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.