I have queries regarding the PhPExcel library for as I am stuck at a point and not getting how to move ahead. It will be really grateful if I could get help on how can I read, write, & save a .xlsm (mostly this, it has no macros but yeah many calculations) or .xlsx file by passing certain values from a web page and then retrieving the data out of it. The file is a workbook with like 3-4 excel sheets in it, all connected to one another, like the value passing from the web page goes on to sheet 1 but all the calculations & relevant values fetched to perform those calculations comes from sheet 2 and then the respective changes are made on sheet 1 again and the cells to be displayed on the web page are on sheet 1. To elaborate more it is like if I enter a value on the web page, it opens the designated excel file, reads it, writes the changes specified in it and then saves those changes. Then again it opens it, reads the required cells and displays them on the web page. The problem is it is taking a lot of time for reading the file and saving the changes passes from the website and also does not display the expected output and throw errors as shown below after the code.
`if (isset($_POST['submit'])) {
if ($_POST['input'] == 0) {
echo 'The output equals to 0';
} else {
include 'C:\wamp64\www\website\excelvideo\PHPExcel-1.8\Classes\PHPExcel\IOFactory.php';
$objPHPExcel = PHPExcel_IOFactory::load('C:\wamp64\www\website\excelvideo\401k.xlsx');
$objPHPExcel->getActiveSheet()->setCellValue('C2', $_POST['input']);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007");
echo 'Data Saved';
$objWriter->save('401k.xlsx');
echo '<label for="output">Output is as follows:</label><br/>';
$objPHPExcel = PHPExcel_IOFactory::load('C:\wamp64\www\website\excelvideo\401k.xlsx');
echo $objPHPExcel->getActiveSheet()->getCell('C17')->getCalculatedValue().'<br />';`