* small improvement * Fix TutorialVideo for mobile view * main page terminal pro docs * jose whelp * placeholder index file that needs to be removed * fix: fixes sidebar, removes unused index.md * update link to api keys * update api keys link * fix hyperlinks in terminal helper * fix a few more links * fix some more links * linter * black linter * improve main docs page for each product * small refactor * header to take to main page of product * run OpenAI script to generate SEO for pro content --------- Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
3.2 KiB
Vendored
title, sidebar_position, description, keywords
| title | sidebar_position | description | keywords | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Export data | 3 | Learn how to export financial data through the OpenBB Terminal in different formats like XLSX, CSV, JSON, PNG, JPG, PDF, and SVG. Also learn to specify filename, sheet name, and export directly into a chart. |
|
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
The OpenBB Terminal offers a variety of ways to export financial data. This can be through XLSX, CSV or JSON but also through PNG, JPG, PDF and SVG giving plenty of flexibility to export the data the way you desire.
This can be demonstrated with the --export argument, e.g. if you wish to export to xlsx you would add --export xlsx.
For example, if you wish to download market data you can do so from the stocks menu with the following:
(🦋) /stocks/ $ load AAPL -s 2010-01-01 --export xlsx
This results in the following:
Specifying filename
We also allow you to define a file name, for example for the same stock tickers, we can also add in the filename. This time, we export to csv.
(🦋) /stocks/ $ load AAPL -s 2010-01-01 --export apple.csv
Which results in the following:
Specifying sheet name when XLSX
When you select the xlsx option, you can also specify the sheet name with --sheet-name which allows multiple datasets to be grouped to the same Excel file. Using the same stock ticker, we can define the following. First, get market data from the stocks menu:
(🦋) /stocks/ $ load AAPL -s 2010-01-01 --export apple.xlsx --sheet-name Market Data
Then enter the fa (Fundamental Analysis) menu and copy and paste the code below. This requires an API key from FinancialModelingPrep which you can obtain for free. Please have a look here.
(🦋) /stocks/fa/ $ income --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Income Statement
(🦋) /stocks/fa/ $ balance --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Balance Sheet
(🦋) /stocks/fa/ $ cash --source FinancialModelingPrep -l 10 --export apple.xlsx --sheet-name Cash Flow Statement
This generates a file for Apple with market data from 2010-01-01 until now and income, balance and cash flow statements over the last 10 years as seen in the image below.
Export directly into chart
We allow exporting to images, this can be PNG, JPG, PDF and SVG. For example, using our portfolio menu we can export the charts to any type of format which again can be found within the OpenBBUserData folder.



