Hi All,
My Calc workbook has links to external data and after "Enabling" these connections, some of them fail to update. When I notice the failed ones, I have to update that specific one manually.
How can I do this within the script (LibreOffice Basic) that I am already running for manipulating the data afterwards?
ie. if Cell is "" Then <reload/update that specific link>
Is there a command that I can use in this kind of a logic?
Thanks in advance.
[Solved] Updating external link data
[Solved] Updating external link data
Last edited by gurkand on Fri Sep 13, 2019 7:14 pm, edited 1 time in total.
LibreOffice 6.3
Re: Updating external link data
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Updating external link data
Hello All,
I am trying to update the 4th link as seen in the list of links.jpg.
The macro I wrote for this, and the error message when I try to run are also attached as the error message.jpg.
Any help for this, please?
Thanks in advance.
I am trying to update the 4th link as seen in the list of links.jpg.
The macro I wrote for this, and the error message when I try to run are also attached as the error message.jpg.
Any help for this, please?
Thanks in advance.
LibreOffice 6.3
-
- Volunteer
- Posts: 1549
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Updating external link data
Since the error message indicates there are fewer than 5 links on your spreadsheet, try adding 2 lines to help with debugging.
Immediately after defining oDocument add
The first to verify that oDocument is referring to the correct document.
The second to determine how many links the document supposedly has.
Immediately after defining oDocument add
Code: Select all
print oDocument.Title
print oDocument.SheetLinks.Count
The second to determine how many links the document supposedly has.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Re: Updating external link data
The html links in the screen shot aren't SheetLinks. These are AreaLinks.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Updating external link data
Many thanks for your help.
It is working now.
If you could tell me where I can I find the options that are avail like AreaLinks / getbyIndex() / refresh() I will appreciate that.
It is working now.
If you could tell me where I can I find the options that are avail like AreaLinks / getbyIndex() / refresh() I will appreciate that.
LibreOffice 6.3
Re: [Solved] Updating external link data
In the API documentation and with the help of MRI or any other object inspector.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: [Solved] Updating external link data
What I do is type in OpenOffice plus the search word into a search engine.
OpenOffice AreaLinks second result is this page which has the relevent links to the OpenOffice API reference:
https://wiki.openoffice.org/wiki/Docume ... Area_Links
You'll often find someone has had the problem before and there'll be a thread like this one - which you can also find in the search box at the top of the page.
OpenOffice AreaLinks second result is this page which has the relevent links to the OpenOffice API reference:
https://wiki.openoffice.org/wiki/Docume ... Area_Links
You'll often find someone has had the problem before and there'll be a thread like this one - which you can also find in the search box at the top of the page.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)