[ Codebook - Excel] How to dynamically link ".xlsx" or ".csv" file generated in Codebook to Excel
Hello, I have an issue concerning the retrieval of data to an excel file.
1. I use the Refinitiv Date Library API in Python using Codebook.
2. I am trying to obtain data about numerous financial instruments (equity, stocks,...) concerning their performance indicator ("TR.TotalReturn") over a period of 5 years (until now) on a weekly basis.
My goal is to link the data that I get with my code to an Excel file updating whenever the financial data about the instruments change.
3. My uncomplete but actual code is this one below :
I use "df.to_csv" and "df.to_excel" to save my results and I can export them on Excel afterwards by downloading them. But at the end, it is not making my Excel file directly linked to the data acquired by my code.
If anyone could help me about that or tell me about another way to get data from Refinitiv DataBase to an Excel file. Thank you !
Best Answer
-
Hi @fjubin,
Codebook is a cloud based environment and this CSV/Excel file generated in the cloud and then downloaded to your local machine - cannot automatically get data from cloud.
For this you can use the Workspace Excel app (workspace plugin for Excel) and build your spreadsheet with Workspace formulas for Excel. This app is installed as a part of your Workspace installation. Once built, you can re-run all the formulas to get the latest data and update the spreadsheet.
0
Answers
-
Hi @fjubin ,
Can you please elaborate on what you mean by saying "when the data changes". In your request you are getting historical prices for a given period. What change do you mean there?
Your approach of saving data from API to excel is correct, however when you save the dataframe output to csv/xlsx, it is stored in your local folder within Codebook.
Maybe I am missing something here, but it can't be linked to data change. If you want to update the content of your excel by, let's say adding data for more days, you need to change the API call to reflect it and save the new output to excel.
Best regards,
Haykaz
0 -
Hi, thank you for your reponse.
Sorry for the lack of accuracy in my problem. My goal is to have an Excel file automatically getting data from cloud with the characteristics of a bunch of instruments. Over a period of 5 years until now (it is why the need of dynamism for the Excel file since "now" change every week").
But as @Gurpreet answered me, it seems impossible in the Codebook environment unless you have a solution. Meantime, trying to use the Refinitiv add-in in Excel seems the most practical solution.0
Categories
- All Categories
- 6 AHS
- 37 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 中文论坛