ClimberMel / SMF_Add-in

Stock Market Functions for Excel using VBA
https://climbermel.github.io/SMF_Add-in/
14 stars 5 forks source link

Update to smfGetYahooJSONData() function to handle "earningsDate" JSON data #47

Closed Bruce-95 closed 3 days ago

Bruce-95 commented 1 year ago

Hi Mel,

somethings I can never leave alone. I believe I fixed the element "91;YahooCE;Earnings Date End;....." problem. It's now getting the "end" date if it exists. If it doesn't it gets the "start" date.

It required adding an optional parameter and a little code to "modGetYahooJSONData.bas" (attached). It wasn't as convoluted as I thought. It works by putting in a "1" after the Type parameter:

=smfGetYahooJSONData(ticker, "calendarEvents", "earningsDate", , "fmt", 1)

You'll also need to replace element 91 (smf-elements-1.txt) :

91;YahooCE;Earnings Date End;=smfGetYahooJSONData("~","calendarEvents","earningsDate",,"fmt",1)

Regards, ~ Bruce

P.S. This supersedes my comments re element 91 in issue #46.

modGetYahooJSONData.zip

ClimberMel commented 3 days ago

This module has been updates so it works with Excel 64 bit. Not sure if this is an issue anymore, so closing since this would undo changes already in production. It can be re-opened later if still required and then new module would need to used and testing would need to be done.