$worksheet->setmerge($linha, 0, $linha, 2); $worksheet->write($linha, 0, 'Royalties:', $styleleft); $worksheet->write($linha, 1, '', $styleleft); $worksheet->write($linha, 2, '', $styleleft); $worksheet->write($linha, 3, $t_pagar, $stylereal); $worksheet->write($linha, 4, $pagar_memoria, $styleleft); $linha++; $worksheet->setmerge($linha, 0, $linha, 4); $worksheet->write($linha, 0, '', $stylebg); $linha++; $worksheet->setmerge($linha, 0, $linha, 3); $worksheet->write($linha, 0, 'Pedidos Contabilizados:', $styletitulo4); $worksheet->write($linha, 4, '', $stylebg); $workbook->close(); #grava relatorio no banco $b->id_relatorio = $relatorioDAO->registraRelAnterior($emp->id_empresa, $arquivo, 'royalties', $retorna); $b->juros_mora = 10; $b->ocorrencia = 1; $b->instrucao1 = ''; $b->instrucao2 = ''; $b->cpf = $emp->cpf; $b->sacado = $emp->empresa; $b->endereco = $emp->endereco; if ($emp->numero != '') { $b->endereco .= ',' . $emp->numero; } if ($emp->complemento != '') { $b->endereco .= '-' . $emp->complemento; } $b->cep = $emp->cep; $b->emissao_papeleta = 2;