<?php
/*
Autor: Lic. Carlos Alberto Vaca Coronado
Version: 3.2.0
*/
session_name('portal_absa');
session_start();
error_reporting(E_ALL);
require("Spreadsheet/Excel/Classes/PHPExcel.php");
require "Spreadsheet/Excel/Classes/PHPExcel/IOFactory.php";
require "../conexion/conectar.php";
//require "../libs/funciones.php";


$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator("Mi.DisXII.com")
							 ->setLastModifiedBy("Mi.DisXII.com")
							 ->setTitle("Office 2003 XLS")
							 ->setSubject("Office 2003 XLS")
							 ->setDescription("Document for Office 2003 XLS")
							 ->setKeywords("office 2003")
							 ->setCategory("Result file");

$conexion = new CONDB();
$conexion->conectar();

include "hojaExcelLayoutPagos.php";

$objPHPExcel->setActiveSheetIndex(0);
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename=LayoutPagos.xls');
header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');

$objWriter->save('php://output');
//$objWriter->save('test.xls');
?>