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

0

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:

$resta=$valores1-$valores;

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

            $objPHPExcel->setActiveSheetIndex(0)
                    ->setCellValue('C'.$i, $resta[$i]);
                    $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
source

0 answers