Issue
i want to iterate through each column and apply formula.
for example:
'I'.$ab = ('H'.$ab*100)/A34;
I want to apply formula like above in I column where $ab is row number.
So how can i do it.
Thanks
Solution
It's absolutely basic PHP, just a simple iteration, and some string concatenation
for ($ab = 2; $ab <= 10; ++$ab) {
$objPHPExcel->setActiveSheetIndex(0)
->setCellValue('I'.$ab, '=(H'.$ab.'*100)/A34');
}
Answered By - Mark Baker Answer Checked By - Pedro (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.