excelize icon indicating copy to clipboard operation
excelize copied to clipboard

Event on cell changes

Open gedw99 opened this issue 2 years ago • 6 comments

I need to get an event when a cell changes . Is this currently supported ?

gedw99 avatar May 19 '22 07:05 gedw99

Sorry, this library doesn't support this feature currently.

xuri avatar May 19 '22 07:05 xuri

thanks. I can probably add it.

Can you give me some info about how changes are tracked ?

gedw99 avatar May 19 '22 08:05 gedw99

https://github.com/qax-os/excelize/blob/master/cell.go#L118 looks like the entry point...

gedw99 avatar May 19 '22 08:05 gedw99

Could you describe the scenario of using listen to cell change event? If you can tell the cell to change listener (handler) when setting cell value in your program, that is not required to modify the library.

xuri avatar May 20 '22 03:05 xuri

My use case of that I am using the excel file as a quasi database .

Mutations to cells and formula happen from my code via your API.

when mutations happen to a cell I need to react to those changes in higher lever code.

if this is out of scope or too ambitious please let me know and I will drop support for excel files in my system and I stress revert to just supports csv.

gedw99 avatar Aug 21 '22 18:08 gedw99

When will mutations happen to a cell? I think if you know who will modify the cell value, if which also using this library to change the cell value, could you comminute with them each that other? That's not required to modify the library. If the cell value modifies via the Office application user interface, this library is unable to recognize which part of the workbook file has been changed.

xuri avatar Aug 24 '22 08:08 xuri