How to dynamically add to PHPExcel spreadsheet
<p>Alright, So I have this code</p>

<pre><code>        $key = $_SESSION['order_nums'];
        $sqll = "SELECT * FROM `money` WHERE `order` = :key";
        $qq=$con-&gt;prepare($sqll);
        $qq-&gt;bindvalue(":key", $key);
        $qq-&gt;execute();


        $excel2 = PHPExcel_IOFactory::createReader('Excel2007');
        $excel2 = $excel2-&gt;load('nTest.xlsx'); // Empty Sheet
        $excel2-&gt;setActiveSheetIndex(0);
        $worksheet = $excel2-&gt;getActiveSheet();

        while($fdata=$qq-&gt;fetch(PDO::FETCH_ASSOC))
        {   
            $worksheet
                -&gt;setCellValue('A7', $fdata['code']);


        }
</code></pre>

<p>Where it it setting the cell value for A7 there is about 6 more of those that match. When I do it like this however, It only puts its into the CELL A7</p>

<pre><code>            while($fdata=$qq-&gt;fetch(PDO::FETCH_ASSOC))
        {   
            $worksheet
                -&gt;setCellValue('A7', $fdata['code']);


        }
</code></pre>

<p>How can I make it where
The above value will Drop down one cell for each new entry.</p>

<p>So the next would be A8, A9..... and so on.</p>