Google Sheets – Historic currency conversion rates

Software:
Google Sheets

This is slightly off-topic in this blog, but since this subject has seriously baffled me, I decided to document and share the solution.

Getting a currency conversion rate in into a Google Sheets expression is fairly simple:

The expression:

GoogleFinance("CURRENCY:USDILS")

Simply returns the current conversion rate, in this case between US Dollars – “USD” to Israeli Shekel – “ILS”, expressed as the term “USDILS”.

So what’s the problem?
When using the GoogleFinance function to retrieve a historic conversion value like so:

GoogleFinance("CURRENCY:USDILS","price","1/1/2012")

the function doesn’t return the numeric value of the price, but instead, creates a table (see image below):

This seems like a nice feature.. so what’s the problem?
If you need to use the conversion rate within a larger scope calculation, the return value will be the string “Date” instead of a numeric value representing the conversion rate, and that will cause an error:

330*index(GoogleFinance("CURRENCY:USDILS","price","1/1/2012"),2,2)

So.. what’s the solution?
The solution is to use the index function to retrieve the wanted value from the table returned by GoogleFinance.
In this case index(weird_surprising_tabel,2,2) returns the wanted value:

330*index(GoogleFinance("CURRENCY:USDILS","price","1/1/2012"),2,2)

That’s it.
Hope you’ll find this useful! 🙂

P.S.
I do use Google Sheets for subjects directly related to CG work, and I should definitely bring some examples of that here in this blog.

Setting Windows 10 Ransomware protection not to block Adobe Photoshop

Software:
Adobe Photoshop 2020 | Microsoft Windows 10

If you encountered this error message when launching Adobe Photoshop:
“There was a problem with Generator. If the problem persits….”
Annotation 2020-04-18 221206

Chances are it has to do with Windows 10 Ransomware protection blocking it and one of it’s components, and if you continue to working with Photoshop with this problem you’ll find export modules (and maybe other features) not working.

In-order to fix the problem, we have to set Windows Ransomware protection not to block these components:

  1. In the Windows Virus & threat protection settings,
    Click Manage ransomware protection:
    Annotation 2020-04-18 221251
  2. In the Windows Ransomware protection settings,
    Click Allow an app through Controlled folder access:
    Annotation 2020-04-18 221352
  3. In the Allow an app through Controlled folder access settings,
    Click Add an allowed app:
    Annotation 2020-04-18 221420
  4. To avoid having to locate the specific executable files choose Recently blocked apps:
    Annotation 2020-04-18 221444
  5. In the Recently blocked apps select both AdobeGCClient.exe and Photoshop.exe:
    * Click the plus button to add them:
    Annotation 2020-04-18 221639

 

General note:
You may need to to the same with many other apps.
Every time you get a Windows notification about a process being blocked,
Visit the ransomware protection setting, check what was the last app being blocked and see if it needs to be allowed to operate

That’s it. hope you’ll find this helpful! 🙂

 

 

Notepad++ – Show White Space and TAB

Software:
Notepad++ 7.5.9

A lot of Python debugging frustration can be avoided by activating the ‘Show White Space and TAB’ option from the View > Show Symbol menu.

This view option displays yellow dots for White Spaces and yellow arrows for TAB indents in the script, and can save precious time locating places where the indentation is wrong.

Untitled-1.jpg