'Links to External Files' - update from a macro?

Is it possible to access the command to update Links to External files from Python code?
‘Edit’ → ‘Links to External Files’->select filename->'Update ’

This was noted in the documentation as being an internal tabel and exposed for use in code.

Write a Python script that copies or moves the new file to the referenced file.

I’m not sure what you “really” want.

If you want to force the links to update on open, just pass the argument:

opt = {'UpdateDocMode': 3}

If you want to change the link in a cell to an external file, just change the formula.

cell.Formula = NEW_LINK

Thnaks for the respone.

I have a spreadsheet which formats and displays data read from a linked CSV file. The CSV is generated by a totally separate legacy system (at unpredictable times!) ; every time the CSV is rewritten I want to update the info. displayed in the s/s without having to manually do ‘Edit’ → ‘Links to External Files’->select filename->'Update’.

I am opening LO in listening mode and using python to attach to it, I’d like to get my python code to start the Update External File process for the changed CSV.

I’m open to all and any alternative approaches!

Take advantage of the power of Python, read the CSV directly whenever you need or change it, and send this data to Calc.