"Update All" button for Links

Discuss the spreadsheet application
Post Reply
PatrickDickey_102
Posts: 10
Joined: Mon Oct 18, 2010 9:32 pm

"Update All" button for Links

Post by PatrickDickey_102 »

Hello there,

I'm migrating over from Excel, and have a spreadsheet with 35 different "sheets" in it. Basically it's a stock investment template and the sheets are external links to finance.yahoo.com for updating the quotes. In Excel, there was a "Refresh All Connections" under their Data menu (or Data Ribbon). I don't see anything similar in Calc.

I have the links set up to automatically update (and they do for the most part). However, I like to be able to manually check them. It's not practical to open Edit -> Links, and click Update for each link because of the number of connections.

So, my question/suggestion is this: Is there a way to manually update all of my external links at once? If not, is that a feature that is being planned?

Thanks, and have a great day:)
Patrick.
Open Office 3.2 installed on Windows 7 Business 32-bit.
Libre Office installed on Ubuntu 11.04 32-bit.
User avatar
Charlie Young
Volunteer
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: "Update All" button for Links

Post by Charlie Young »

PatrickDickey_102 wrote:Hello there,

...my question/suggestion is this: Is there a way to manually update all of my external links at once? If not, is that a feature that is being planned?

Thanks, and have a great day:)
Patrick.
This macro should do it. It could be attached to a button or a menu choice, if it works as desired.

Code: Select all

Sub RefreshAll
	Dim Doc as Object
	dim x as Object
	dim a as Object
			
	Doc=ThisComponent
	x=Doc.AreaLinks.CreateEnumeration
	Do While x.hasMoreElements()
		a=x.NextElement()
		a.Refresh
	Loop
End Sub
Apache OpenOffice 4.1.1
Windows XP
mriosv
Volunteer
Posts: 651
Joined: Mon Mar 09, 2009 1:12 am
Location: Galiza (España)

Re: "Update All" button for Links

Post by mriosv »

Don't work hard recalc Shift+Ctrl+F9?
LibreOffice 3.5.4 AOo-3.4 on Win 7 Ultimate
User avatar
Charlie Young
Volunteer
Posts: 1559
Joined: Fri May 14, 2010 1:07 am

Re: "Update All" button for Links

Post by Charlie Young »

mriosv wrote:Don't work hard recalc Shift+Ctrl+F9?
No, that doesn't refresh external links.
Apache OpenOffice 4.1.1
Windows XP
PatrickDickey_102
Posts: 10
Joined: Mon Oct 18, 2010 9:32 pm

Re: "Update All" button for Links

Post by PatrickDickey_102 »

Charlie Young wrote:
PatrickDickey_102 wrote:Hello there,

...my question/suggestion is this: Is there a way to manually update all of my external links at once? If not, is that a feature that is being planned?

Thanks, and have a great day:)
Patrick.
This macro should do it. It could be attached to a button or a menu choice, if it works as desired.

Code: Select all

Sub RefreshAll
	Dim Doc as Object
	dim x as Object
	dim a as Object
			
	Doc=ThisComponent
	x=Doc.AreaLinks.CreateEnumeration
	Do While x.hasMoreElements()
		a=x.NextElement()
		a.Refresh
	Loop
End Sub
I created the Macro, and saved the document. I'll have to wait until tomorrow (after the markets are opened) to find out if it works. If so, how would I go about attaching it to a button (either on one of the toobars, or somewhere else)?

Thanks, and have a great day:)
Patrick.
Open Office 3.2 installed on Windows 7 Business 32-bit.
Libre Office installed on Ubuntu 11.04 32-bit.
R_Cies
Posts: 2
Joined: Fri Oct 17, 2014 2:45 pm

Re: "Update All" button for Links

Post by R_Cies »

Charlie Young wrote:
mriosv wrote:Don't work hard recalc Shift+Ctrl+F9?
No, that doesn't refresh external links.
Yes it does but only when the source file is open. You can also record a macro and press Shift+Ctrl+F9 . I use LibreOffice 3.3
OOo 4.1 and windows8.1
Post Reply