0

I have a CSV file with data I want in a spreadsheet - mostly to display a chart based on it. I also want the chart to be updated every time the file is rewritten by a console application. What I tried already:

  1. Open it in Calc, then rewrite it on disk. Impossible due to Calc locking the file.
  2. Played with shared spreadsheets in Calc. Did not help much.
  3. Tried to set it up through LO Base. LO Base does not lock the database source but refuses to update its table view anyway. The Refresh/Reload button does nothing.

Any suggestions?

2 Answers 2

2

In Calc choose your file via menu Sheet > Link to External Data..., check update every x seconds with value that you want. Browse for your CSV file. Check choosen encoding. Works for me. Without any reloading.

My Sheet looks like:

| A | B | C |
|---|---|---|
| 1 | 2 | 3 |

My external.csv:

4,5,6

After execute Link... from menu additional row wave been added and Sheet

| A | B | C |
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |

Add data to the file with echo "7,8,9" >> external.csv and I've got another row in Sheet.

Change the file sed -i '' 's/9/0/' external.csv and Sheet

| A | B | C |
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 0 |
5
  • Doesn't work for me; OK button in the External Data dialog is greyed out. Could you please explain the whole sequence: which file to open, which one to link to it? I have only one file, really - the one I want to update.
    – sigil
    Commented Mar 24, 2019 at 14:00
  • You said that you want to dynamically update a LibreOffice spreadsheet from file. So in my example I have two files: main.ods (Sheet with row 1,2,3) and external.csv which I link to main and updating. From your comment, I assume that you're probably trying to update the CSV file itself in LibreOffice. Try to save file in native format and then check CSV linking. Commented Mar 24, 2019 at 14:59
  • Tried saving it as a separate file. No effect either. The problem is most likely in the empty Available Tables/Ranges field, but I have no idea why Calc refuses to put anything there.
    – sigil
    Commented Mar 24, 2019 at 15:27
  • I tried with new empty file. Works good the same way. Button is grayed out until I browse and choose an external file. Commented Mar 24, 2019 at 15:47
  • Repeated it all over from an empty file and now it works. Thanks, man.
    – sigil
    Commented Mar 24, 2019 at 16:15
0

2022 update, you can now instead go to: Sheet / External links.. and tick "update very x seconds"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .