Answer the question
In order to leave comments, you need to log in
How to open-edit-save large xls?
Hello.
There is a template file in xls format on the server, I need to open it, enter data into it and save it under a different name and send it for download. But! Since the file is 590 kb my server cannot process it.
I found an article , but, as I understand it, this code can only read the data, but not save it, or am I wrong?
Actually a question: How to solve this problem? Or how to change the code given in the article so that it can save?
Answer the question
In order to leave comments, you need to log in
I recently answered a question about recording. Unfortunately my code only writes large files. But he does it very quickly.
Answer read here:
How to export a large table to Excel using PHP?
I do like this:
require_once '../lib/PHPExcel.php';
require_once '../lib/PHPExcel/IOFactory.php';
$pExcel = PHPExcel_IOFactory::createReader('Excel2007');
$pExcel = $pExcel->load('../template/report_full_information.xlsx');
$pExcel->setActiveSheetIndex(0);
$aSheets = $pExcel->getActiveSheet();
/*пишем в файлик все, что нужно через $aSheets->setCellValue()*/
$objWriter = PHPExcel_IOFactory::createWriter($pExcel, 'Excel2007');
$file = "filename.xlsx";
$objWriter->save('../export/'.$file);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question