Open files automatically then apply macro

I am working on a project with a RPi and LibreOffice. The plan is to have an XLSX file uploaded to the RPi every 15 minutes. This file is modified by our production staff regularly, saved on our file server, then transferred via FTP to the RPi by a scheduled task. The RPi will use Calc to open the file automatically and display it on a monitor on our production floor. This file will need to be reloaded on a timed basis (Every 15 minutes) to show the updated spreadsheet.

What would be the best way to accomplish this?

Thanks!

You don’t need a macro for that. Give the cell range that is to be displayed a name, like displayrange and save. Then create a new document and go to Sheet → External Links…, enter the URL (or path if local file, or browse) of the document and hit Enter, then from Available Tables/Ranges select displayrange, activate Update every and enter 900 (seconds = 15 minutes). OK. Save. Display that file on your production floor monitor, it will update from the linked file every 15 minutes.

You probably also want to allow automatic update of links upon first file load, see Calc - Update external / internal links - locked cells - problem - #4 by erAck.

1 Like

This works. Thank you for the suggestion!