content top


Gerando Excel via PHP

Gerando Excel via PHP





Encontrei a biblioteca php-excel realizei alguns testes e gostei muito dos resultados, o codigo é muito facil de ser implementado.

Pagina da biblioteca: http://code.google.com/p/php-excel/

Meu teste: http://www.coisasuteis.com.br/php-excel/

A biblioteca possui um arquivo chamado class-excel-xml.inc.php onde você deverá incluir nos seus scripts, depois crie um vetor e chame a classe e booom…. bem bacana.


require (class-excel-xml.inc.php");

$doc = array (
1 => array ("Nome", "email", "telefone"),
array ("Marlene", "marlene@coisasuteis.com.br", "(27)992726266"),
array ("João da Silva", "joao@coisasuteis.com.br", "(27)993326211"),
array ("Maria", "maria@coisasuteis.com.br", "(27)982726261")
);

$xls = new Excel_XML;
$xls->addArray ( $doc );
$xls->generateXML ("lista");


Feed RSS para comentários sobre este post. TrackBack URL

Deixe um comentário


1 Comentário »



  1. avatar comment-top
    Unknown Unknown
    Check this out……

    [...] that is the end of this article. Here you’ll find some sites that we think you’ll appreciate, just click the links over[...]………

    comment-bottom