Cakephp : Creating a spreadsheet that captures and saves data in cakephp 2

629 Views Asked by At

Hie guys, i have a system running in cakephp and I have a requirement to create a platform to capture marks and calculate them as a percentage of 30 in other words I am supposed to model the functions of excel (including formulas for adding and multiplying) into the cakephp app. I have gone through PHPExcel but im failing. Any idea of what i can use? Thank you.

2

There are 2 best solutions below

2
Alvaro On

This is not so related with CakePHP. I would say, with Javascript.

Here you have a great plugin to deal with tables: http://handsontable.com/

I found it some days ago here, created by @warpech: https://stackoverflow.com/a/9997458/1081396

1
Mark Baker On
$mark = 25;
$percentage = $mark / 30 * 100;

or using Excel, if mark is in cell B1 then C1 formula is

=B1/30*100