现在我们知道在 Microsoft Excel中转换货币是多么容易,但是Google 表格(Google Sheets)呢?该工具可能不像Excel那样功能丰富,但它能够做很多事情,包括兑换货币,不少。
(Convert Currency)在Google表格中转换货币并获取股票数据(Stock Data)
为了在Google 表格(Google Sheets)上完成这项工作,我们将使用GOOGLEFINANCE功能。它将利用直接从谷歌(Google)本身获取的准确财务数据。
我们喜欢GOOGLEFINANCE功能,因为它可以提供来自世界各地市场的实时和当前财务数据。如果您想知道最新的汇率,那么使用Google 表格(Google Sheets)应该不是问题。
在继续之前,我们需要指出该函数将每隔 20 分钟更新一次工作表。(Sheet)
1]计算当前汇率的公式
好的,所以当谈到了解当前汇率时,您必须首先确定将使用哪些货币对。我们将重点关注美元和牙买加元作为我们的主要货币对。
要完成此操作,请在功能部分键入以下内容,然后按 Enter 键:
=GOOGLEFINANCE("Currency:USDJMD")
根据您的需要,您可以将任一货币对替换为另一货币对。现在,上面的示例显示了当前美元(USD)对JMD的汇率。
2]获取(Get)历史汇率数据
是的,可以使用Google 表格(Sheets)来访问过去的汇率信息。不知道我们可以回去多远,也不打算知道。(Were)
获取历史汇率数据的相关功能如下:
=GOOGLEFINANCE("CURRENCY:USDJMD", "price", DATE(2018,1,1))
尽可能(Make)更改函数以满足您的需要。
3]获取实时股票价格
如果您需要访问实时股票价格,那么可以在Google 表格(Google Sheets)中轻松完成。
为了展示实时股票数据,请使用以下函数:
=GOOGLEFINANCE("NSE:RELIANCE","price")
如您所见,NSE被用作首选证券交易所市场,它表示印度(India Ltd)国家证券交易所(National Stock Exchange)有限公司,股票代码为RELIANCE。如您所见,该属性仅限于价格。
4] 获取历史股价数据
现在,仅仅知道当天的价格可能还不够,那么学习与股票代码相关的历史数据怎么样?
通过运行以下命令完成所有工作。请务必根据自己的喜好进行编辑:
=GOOGLEFINANCE("NSE:RELIANCE", "open", DATE(2018,3,10), DATE(2018,10,3), "DAILY")
上述功能将在每日显示 2018 年 3 月 10 日至 2018 年 10 月 3 日期间的数据。如果需要,可以将DAILY更改为(DAILY)WEEKLY甚至MONTHLY。只需(Just)使用适合您的任何东西。
我们在这里列出的只是基础知识。也许在未来,我们会更深入一点,让你了解。
阅读下一篇(Read next):如何通过 Google Drive 创建指向 Google Sheets PDF 链接的直接链接(create a direct link to Google Sheets PDF link via Google Drive)。
How to convert Currency and get Stock Data in Google Sheets
By now we know how eаsy it is to cоnvert currency in Microsoft Excel, but what about Google Sheets? The tool may not be as feature-rich as Excel, but it is capable of doing quite a few things, and that includes converting currency, no less.
Convert Currency and get Stock Data in Google Sheets
To get this done on Google Sheets, we will be using the GOOGLEFINANCE function. It will take advantage of accurate financial data taken directly from Google itself.
We like the GOOGLEFINANCE function because it can deliver real-time and current financial data from markets around the world. If you want to know the latest exchange rate, then using Google Sheets shouldn’t be a problem.
Before going forward, we need to point out that the function will update the Sheet at an interval of every 20 minutes.
1] The formula to find the current exchange rate
OK, so when it comes down to knowing the current exchange rate, you must first determine which currency pairs will be used. Were going to focus on American and Jamaican dollars as our primary pair.
To get this done, please type the following into the function section and then hit the enter key:
=GOOGLEFINANCE("Currency:USDJMD")
Depending on your needs, you can replace either currency pair with another. Now, the example above shows the current USD to JMD rate.
2] Get historical exchange rate data
Yes, it is possible to use Google Sheets to gain access to exchange rate information from back in the past. Were not sure how far we can go back and were not about to find out.
The function in question to gain access to historical exchange rate data is as follows:
=GOOGLEFINANCE("CURRENCY:USDJMD", "price", DATE(2018,1,1))
Make changes to the function to fit your needs where possible.
3] Get live stock prices
Should there ever be a time when you need access to live stock prices, then this can be done from within Google Sheets with ease.
In order to showcase live stock data, use the following function:
=GOOGLEFINANCE("NSE:RELIANCE","price")
As you can see, NSE is used as the stock exchange market of choice, and it means the National Stock Exchange of India Ltd, and the ticker is RELIANCE. And as you can see, the attribute is limited to just price.
4] Get historical stock price data
Now, just knowing the price for the day might not be enough, so how about learning of the historical data relating to the ticker?
Get everything done by running the following command. Be sure to edit to your liking:
=GOOGLEFINANCE("NSE:RELIANCE", "open", DATE(2018,3,10), DATE(2018,10,3), "DAILY")
The above function will show data from the period of 2018/3/10 to 2018/10/3 on the daily. If you want, DAILY can be changed to WEEKLY or even MONTHLY. Just work with whatever works for you.
What we’ve laid out here are just the basics. Maybe in the future, we will go a little bit deeper for you to understand.
Read next: How to create a direct link to Google Sheets PDF link via Google Drive.