Pass the value of a variable in php to an excel column with phpExcel


Generate reports with use of the phpExcel library, when generating the reports I do it by means of queries and I only send them to call with a variable within a while , the conflict is when you want to save values of a variable that generated from two other variables. How could I do this? The code I use is:


        $i = 9;
        while ($fila = ($resta)->fetch_array()) {

                    ->setCellValue('C'.$i, $resta[$i]);

$valores1 and $valores are variables that store two different queries, I try to subtract those queries and the result is within the subtraction variable that I try to store in a column in excel .

asked by Madaley 23.11.2018 в 17:17

0 answers