How to upload information from a Mysql to an EXCEL already established

0

What I'm looking for is that my information that I present in a mysql, can be shown in an excel already created, and that only autocomplete. I'm using the PHPExcel library ?

Now I have the code in this way

    
asked by Kevincs7 09.08.2018 в 22:31
source

1 answer

0

Use this library before, you are currently creating a new file when you perform

$objPHPExcel = new PHPExcel();

Then, you must upload the existing file:

$directorio = "";
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objPHPExcel = $objReader->load($directorio);

At the end you must decide if you save the original file, or if you show the file modified by screen, but keeping the original intact.

You also have the SO source [EN]

    
answered by 10.08.2018 в 05:33