Código PHP:
function guardar()
{
error_reporting(15);
if ( isset($_FILES['archivo']) && is_uploaded_file($_FILES['archivo']['tmp_name']) && is_readable($_FILES['archivo']['tmp_name']) ) {
require_once($_SERVER['DOCUMENT_ROOT']."/includes/php/excel_php/reader.php");
//require_once($_SERVER['DOCUMENT_ROOT']."/includes/php/funciones.php");
$excel = new Spreadsheet_Excel_Reader();
$excel->setOutputEncoding("CP1251");
$excel->read($_FILES['archivo']['tmp_name']);
// numero de filas y columnas
$posf = 0;
$filas = $excel->sheets[0]['numRows'];
$columnas = $excel->sheets[0]['numCols'];
$filas_f = $filas - 1;
$columnas_f = $columnas - 1;
echo "Filas: " .$filas;
echo "Columnas" .$columnas;
// Notice: Undefined offset: 16 in \index.php on line 147
// No hay nada en la linea 16 de la planilla excel
// Buscando el nombre del canal
for($posf = 1; $posf <= $filas_f ; $posf++ ){
if( $excel->sheets[0]['cells'][$posf][1] == "" ){
print "No hay nada";
}
if( $excel->sheets[0]['cells'][$posf][1] == "Nombre del Canal" ){
$inicio = $posf + 1;
break;
}
}
for($fil = $inicio; $fil <= $filas_f ; $fil++ ){
for($col = 1; $col <= 3 ; $col++){
// Comprobando si existen elementos N/A
// de ser asi, lo deja en 0.
if( $excel->sheets[0]['cells'][$fil][$col] == "N/A" ){
$excel->sheets[0]['cells'][$fil][$col] = 0;
}
//echo "\"".$excel->sheets[0]['cells'][$i][$j]."\",";
print $excel->sheets[0]['cells'][$fil][$col]."<br>";
} // fin 1° for
if( $excel->sheets[0]['cells'][$fil][$col] == "" ){
break;
}
echo "\n";
} // fin 2° for
} // fin if
} // fin guardar
Filas: 31Columnas6
Notice: Undefined offset: 5 in C:\produccion2\wwwrootES\estadisticas\index.php on line 155
No hay nada
Notice: Undefined offset: 5 in C:\produccion2\wwwrootES\estadisticas\index.php on line 159
Notice: Undefined offset: 17 in C:\produccion2\wwwrootES\estadisticas\index.php on line 155
No hay nada
Notice: Undefined offset: 17 in C:\produccion2\wwwrootES\estadisticas\index.php on line 159
General
34702
28487
Desarrollos
0
0
Recomienda-Newsletters
0
0
Cartas-Al-Editor
0
0
112
80
Santander Universidades
317
280
Politicas
0
0
Etica
0
0
Recomendar
0
0
Investigacion
65
25
html
34208
28131
Notice: Undefined offset: 30 in C:\produccion2\wwwrootES\estadisticas\index.php on line 171
Notice: Undefined offset: 30 in C:\produccion2\wwwrootES\estadisticas\index.php on line 176
Notice: Undefined offset: 30 in C:\produccion2\wwwrootES\estadisticas\index.php on line 171
Notice: Undefined offset: 30 in C:\produccion2\wwwrootES\estadisticas\index.php on line 176
Notice: Undefined offset: 30 in C:\produccion2\wwwrootES\estadisticas\index.php on line 171
Notice: Undefined offset: 30 in C:\produccion2\wwwrootES\estadisticas\index.php on line 176
Notice: Undefined offset: 30 in C:\produccion2\wwwrootES\estadisticas\index.php on line 180
ojala me puedan orientar para solucionar este problema. de antemano muchas gracias.