Programmatically updating spreadsheet while it's in use

Is there any way to programmatically update a spreadsheet thats currently in use by Libreoffice Calc, similar to how Google Spreadsheet works?

I want to keep a spreadsheet open, but have a daily process automatically insert rows in certain places. I’ve written the script to do the insertion, but it requires the spreadsheet to be closed. Is there any way around this?