How to add temporary column at display time

Topics: Developer Forum, User Forum
Feb 22, 2014 at 7:13 AM
Hi Guys,

I want to show temporary column at display time. By means, If I have displayed my excel sheet on browser which contains 10 columns (say) but If I want to add one more columns manually from my side when it display on browser then what should be code modification?

Code :
echo 'Data:<BR><BR><BR><table width="100%" cellpadding="3" cellspacing="0" border=1 bordercolor="green"><tr>';
for ($row = $srow-1; $row <= $highestRow-2; ++ $row) {
   echo '<tr>';
   for ($col = 0; $col < $highestColumnIndex; ++ $col) {
       $cell = $worksheet->getCellByColumnAndRow($col, $row);
       $val = $cell->getValue();
       if($row === 1)
            echo '<td style="background:#000; color:#fff;">' . $val . '</td>';
           echo '<td>' . $val . '</td>';
echo '</tr>';
echo '</table>';
What should be modification in above code?
How can I fill each row of that column?