Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/04/2011, 07:37
Avatar de Patriarka
Patriarka
 
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 3 meses
Puntos: 288
PHPExcel no exporta archivos

Hola otra ves, tengo un problema con PHPExcel,
esta clase te permite exportar ciertos tipos de archivos como xml por ej
a excel, bueno el tema es que no lo esta haciendo:

Código PHP:
Ver original
  1. <?php
  2. /*
  3.  * EXPORTAR A EXCEL
  4.  */
  5. require_once 'PHPExcel.php';
  6. require_once 'PHPExcel/IOFactory.php';
  7.  
  8. //PRUEBO CON XML O CON .CSV
  9.  
  10. //$file="/var/www/test/06_04_2011.csv";
  11. $file="/var/www/export/06_04_2011.xml";
  12. if(file_exists($file)){
  13.     echo 'existe: '.$file.'<br >';  //AMBOS ARCHIVOS EXISTEN Y SE LEEN OK
  14. }
  15.  
  16. $objPHPExcel = PHPExcel_IOFactory::load($file);
  17.  
  18. $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
  19. $salida='/www/var/site/files/temp/Transportistasx.xlsx';
  20. $objWriter->save($salida);
  21.  
  22. //echo (file_exists($salida)) ? 'existe: '.$salida : 'no';
  23.  
  24.  
  25. ?>