Can I Control Eikon Excel AddIn for refresh a WorkSheet with VBA ??
Best Answer
-
Hi @sanedrak,
The answer is yes, and there are two sets of macros to facilitate this.
PLxxxxEventHandler macros are behind the Refresh commands in Thomson Reuters ribbon and refresh both Eikon Excel and TF functions. The four macros are:
1 - Application.Run "PLRefreshAllEventHandler" to refresh functions in all open workbooks
2 - Application.Run "PLRefreshWorkbookEventHandler" to refresh functions in the current workbook
3 - Application.Run "PLRefreshWorksheetEventHandler" to refresh functions in the current worksheet
4 - Application.Run "PLRefreshSelectionEventHandler" to refresh functions in the selected range
The above commands are executed asynchronously.
The following Refresh commands allow for a synchronous refresh to occur (one line of VBA code needs to finish executing before the next line can begin). Note they do not refresh TF functions:
1 - Application.Run "EikonRefreshSelection"
2 - Application.Run "EikonRefreshWorksheet"
3 - Application.Run "EikonRefreshWorkbook"
4 - Application.Run "EikonRefreshAll"
The first two (optional) parameters for all 4 macros above are waitForRefresh(boolean) & timeout, e.g.
Application.Run "EikonRefreshSelection", True, 3000 or Application.Run "EikonRefreshSelection", CBool(Sheet1.Range("A1")), CLng(Sheet1.Range("A2"))
If waitForRefresh is True, code will continue after the timeout in milliseconds even if the refresh isn't done. Both parameters are optional - the waitForRefresh default is true & timeout default is 30000 (30 seconds).
1 - EikonRefreshSelection takes a third optional parameter rangeToRefresh. This is an address (short or external) of the range to refresh.
2 - EikonRefreshWorksheet takes a third optional parameter worksheetToRefresh. This is the name of the worksheet to refresh. It can be in "[Book1]Sheet1" format to refresh a sheet in a workbook that isn't in the foreground. Or just "Sheet1" which will look for the sheet in the ActiveWorkbook.
3 - EikonRefreshWorkbook takes a third optional parameter workbookToRefresh. This is the name of the workbook to refresh.
All 4 macros will return the number of functions refreshed when all completed or timed out when waitForRefresh is true.
Both sets of macros (PLxxxEventHandler and EikonRefreshxxxx) do not require any references to any dlls.
Best regards,
Alex
1
Answers
-
thx!!!
Sometimes Reuters showme the text "Stale" into cell of Excel.
Now I can find de text "Stale", and force a refresh!!!!
0 -
Hi and thanks a lot for sharing these methods.
Is it possible to force a clear of the cache using a similar method ?
Thanks,
Alec
0 -
No, it's not possible. You can clear Eikon User cache by running "Eikon.exe -clearcache -a -commandline". But this operation requires that Eikon is shut down. You cannot perform it while Eikon is running or while Eikon Excel add-in is signed in.
0 -
Hi Alex, Ok understood for this.
Thanks for the help and have a good day!
Alec
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛