如何从PHP中打开Excel中加载信息

I have this code and what it does is that it keeps information inside an excel, in this case "Hello World!" , but what happens is that the excel has to be closed so that said execution can be performed and when I try to do it with the open excl it sends me an error. Could you load information with an open excel?

this is the error that comes out

 Warning: unlink(prueba/consulta.xlsx): Permission denied in C:\xampp\htdocs\importexcel\lib\PHPExcel\PHPExcel\Writer\Excel2007.php on line 214

 Warning: ZipArchive::close(): Renaming temporary file failed: Invalid argument in C:\xampp\htdocs\importexcel\lib\PHPExcel\PHPExcel\Writer\Excel2007.php on line 347

 Fatal error: Uncaught exception 'PHPExcel_Writer_Exception' with message 'Could not close zip file prueba/consulta.xlsx.' in C:\xampp\htdocs\importexcel\lib\PHPExcel\PHPExcel\Writer\Excel2007.php:348 Stack trace: #0 C:\xampp\htdocs\importexcel\f.php(24): PHPExcel_Writer_Excel2007->save('prueba/consulta...') #1 {main} thrown in C:\xampp\htdocs\importexcel\lib\PHPExcel\PHPExcel\Writer\Excel2007.php on line 348

and this is the code that I present

<?php
error_reporting(E_ALL);
set_time_limit(0);

date_default_timezone_set('Europe/London');
set_include_path(get_include_path() . PATH_SEPARATOR . 'lib/PHPExcel/');

require_once 'lib/PHPExcel/PHPExcel/IOFactory.php';
require_once 'lib/PHPExcel/PHPExcel.php';
$fileType = "Excel2007";
$fileName = "prueba/consulta.xlsx";

// Read the file
$objReader = PHPExcel_IOFactory::createReader($fileType);
$objPHPExcel = $objReader->load($fileName);

// Change the file
$objPHPExcel->setActiveSheetIndex(0)
        ->setCellValue('A4', 'HELLO')
        ->setCellValue('B4', 'WORD!');

// Write the file
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $fileType);
$objWriter->save($fileName);

?>