Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit pariticular cell in spout PHP excel writer

Tags:

php

phpexcel

I was using PHP Excel to generate a large excel, but PHP Excel consume more memory, it consume 377.37 MB memory, so now i am tried to generate excel with spout excel library

in my case i have pre-generated excel file, i want to just write value of particular cell For Ex- modify value of D48 How can i do this with spout excel?

PHP Excel allow to access and modify particular cell $objPHPExcel->getActiveSheet()->setCellValue('D48','New value');

Is there any methods like setCellValue() in Spout

like image 261
Amit Sanghani Avatar asked Oct 26 '25 11:10

Amit Sanghani


1 Answers

There are no direct way to do that. You can take a look at this example: https://github.com/box/spout/wiki/Edit-an-existing-spreadsheet to achieve what you need though.

Just be aware that styles are not preserved when editing a spreadsheet.

like image 138
Adrien Avatar answered Oct 28 '25 03:10

Adrien



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!