Example #1
0
/*Fim - Cabe�alho*/
//Adicionando a tabela no cabecalho
$table = $subsequent->addTable('Fancy Table');
//Fim - Adicionando a tabela no cabecalho
$table->addRow(100);
$table->addCell(2000, $imagemLogo)->addImage('../../img/logo.png', array('width' => 177, 'height' => 55, 'marginTop' => -1, 'marginLeft' => -1, 'wrappingStyle' => 'behind'));
$table->addCell(7000, $cellColSpan4)->addText(htmlspecialchars(utf8_encode("SISTEMA TRONCAL DE ÔNIBUS DA REGIAO METROPOLITANA DE BELÉM")), 'rStyle', 'pStyle');
//$table->addCell(1000)->addText(htmlspecialchars('Data: '.$diario_de_obra->getData().' '.$diario_de_obra->getDiaSemana()), 'rStyle', 'pStyle');
$table->addRow(100);
$table->addCell(4000, $cellColSpan)->addText(htmlspecialchars(utf8_encode(' Diário de Obra')), 'rStyle', 'pStyle');
$table->addCell(3000, $cellColSpan)->addText(htmlspecialchars(utf8_encode(' Condições do Tempo')), 'rStyle', 'pStyle');
$table->addCell(2000)->addText(htmlspecialchars($diario_de_obra->getData()), 'rStyle', 'pStyle');
$table->addRow(100);
$table->addCell(4000, $cellColSpan)->addText(htmlspecialchars(utf8_encode(' Contratada:')), 'rStyle', 'lStyle');
$table->addCell(1500)->addText(htmlspecialchars(utf8_encode(' Manhã: ')), 'rStyle', 'lStyle');
$table->addCell(1500)->addText(htmlspecialchars($diario_de_obra->getClimaManha()), 'rStyle', 'lStyle');
$table->addCell(2000)->addText(htmlspecialchars($diario_de_obra->getDiaSemana()), 'rStyle', 'pStyle');
$table->addRow(100);
$table->addCell(4000, $cellColSpan)->addText(htmlspecialchars(' Contrato:'), 'rStyle', 'lStyle');
$table->addCell(1500)->addText(htmlspecialchars(utf8_encode(' Tarde: ')), 'rStyle', 'lStyle');
$table->addCell(1500)->addText(htmlspecialchars($diario_de_obra->getClimaTarde()), 'rStyle', 'lStyle');
$table->addCell(2000)->addPreserveText(htmlspecialchars(utf8_encode('PÁGINA') . ' {PAGE} DE {NUMPAGES}.'), 'rStyle', 'lStyle');
$table->addRow(100);
$table->addCell(7000, $cellColSpan)->addText(htmlspecialchars('Obra: ' . $diario_de_obra->getNome()), 'rStyle', 'lStyle');
$table->addCell(1500)->addText(htmlspecialchars(utf8_encode(' Noite: ')), 'rStyle', 'lStyle');
$table->addCell(1500)->addText(htmlspecialchars($diario_de_obra->getClimaNoite()), 'rStyle', 'lStyle');
$table->addCell(3000)->addText(htmlspecialchars(utf8_encode('Nº ') . $diario_de_obra->getNumero()), 'rStyle', 'pStyle');
//Fim Do Cabecalho
// --------------------TABELA CONDICOES DO TEMPO - INICIO -----------------------------------
// $section->addTextBreak(1);
// $table = $section->addTable('Fancy Table');
Example #2
0
<!-- topbar ends -->
 <script src="<?php 
echo EXTERNAL_ROOT_PORTAL;
?>
/js/mascaras.js"></script>
 
 <?php 
/** Error reporting */
define('EOL', PHP_SAPI == 'cli' ? PHP_EOL : '<br />');
date_default_timezone_set('America/Belem');
/** PHPExcel_IOFactory */
require_once dirname(__FILE__) . '/../../lib/excel/Classes/PHPExcel/IOFactory.php';
$objReader = PHPExcel_IOFactory::createReader('Excel5');
$objPHPExcel = $objReader->load("../../arquivos/DIARIO_DE_OBRA.xls");
/* Inicio - Cabecalho - Inserindo Valores nas Celulas Excell*/
$objPHPExcel->setActiveSheetIndex(0)->setCellValue('A6', $diario_de_obra->getNome())->setCellValue('H2', $diario_de_obra->getDiaSemana())->setCellValue('B2', $diario_de_obra->getData())->setCellValue('G1', $diario_de_obra->getNumero())->setCellValue('F10', $diario_de_obra->getClimaManha())->setCellValue('H10', $diario_de_obra->getClimaTarde())->setCellValue('K10', $diario_de_obra->getClimaNoite());
/* Fim - Cabecalho - Inserindo Valores nas Celulas Excell*/
if ($resultado_comentario) {
    /* Ordem - Corpo - Valor numerico de onde vai comecar a preencher o corpo do documento*/
    $ordem = 16;
    foreach ($resultado_comentario as $item) {
        /* Inicio - Corpo - Inserindo Valores nas Celulas Excell*/
        $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A' . $ordem, $item['comentario']);
        $ordem = $ordem + 1;
    }
    /* Fim - Corpo - Inserindo Valores nas Celulas Excell*/
}
if ($resultado_mao_de_obra_direta) {
    /* Ordem - Corpo - Valor numerico de onde vai comecar a preencher o corpo do documento*/
    $ordem = 61;
    foreach ($resultado_mao_de_obra_direta as $item) {