Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/09/2010, 16:26
Avatar de Akiracr
Akiracr
 
Fecha de Ingreso: septiembre-2006
Mensajes: 114
Antigüedad: 17 años, 7 meses
Puntos: 3
Respuesta: Uso de Excel-Reader con archivo almacenado en variable

Me parece que solo poniendo así sin comillas debe funcionar $data = new Spreadsheet_Excel_Reader($archivo);

yo uso esta librería en una clase de la siguiente forma:

function __construct(){
$this->data = new Spreadsheet_Excel_Reader();
$this->data->setOutputEncoding('CP1251');
}


function readLoad($fileName){
$retorno = null;
$this->data->read($fileName);
for ($i = 1; $i <= $this->data->sheets[0]['numRows']; $i++) {
$tmp = null;
for ($j = 1; $j <= $this->data->sheets[0]['numCols']; $j++) {
$tmp[] = $this->data->sheets[0]['cells'][$i][$j];
}
$retorno[] = $tmp;
}
return $retorno;
}
__________________
http://www.maxmendez.net/