SpreadServe Addin ConfigurationΒΆ
Log files
The SSAddin creates log files in your %TEMP% directory. To find them do this in a DOS box:
echo %TEMP%
cd %TEMP%
dir ssaddin* /od
dir *.csv
Note that the process ID of the Excel instance hosting your SSAddin is embedded in the log file
name. The log file captures all the RTD updates sent by the addin to the sheet, together with
their values. It also logs the start and end of Quandl queries. The addin also dumps the result
sets returned from Quandl into CSV files in the %TEMP% directory. The files are named
<QueryKey>_<ProcessID>.csv.
s2cfg sheet
Any spreadsheet that uses SSAddin must have a sheet called s2cfg. The SSAddin worksheet
functions get their configuration from the s2cfg sheet and will fail if it doesn’t exist
or if its contents are not correctly laid out. The log files should alert you if there’s a
problem in your s2cfg sheet. They are also a good way of checking that the addin has composed
your quandl or tiingo queries as you expected. Bear in mind these points on how the addin
scans the s2cfg sheet for configuration. Also check the example sheets in the xls sub directory
for concrete illustrations of the guidelines below.
- SSAddin scans the s2cfg sheet from the first row downwards. It will stop scanning when it finds a row with an empty cell in column A. This means you can’t have spaces between your config. It must all be in a single contiguous block from row 1 downwards.
- The value in column A must be
quandl,tiingo,cron,websockortwebsock. - Depending on the value in column A there are different expectations for the values in
column B onwards.
quandl: column B should bequeryorconfigquery: column C should be the unique QueryKey that’s passed to thes2quandlfunction, column D should bedatasetand column E should name a Quandl dataset egFRED/DED1orOPEC/ORB. Any further columns should give key value pairs to tacked on to the Quandl query URL after the?For instance column F could berowsand column G5so that?rows=5is appended to the URL query submitted to quandl.config: column pairs from C & D onwards are reserved for name value pairs that apply to all queries. Currently onlyauth_tokenis supported. If you putauth_tokenin column C, then put your actual key in column D for it to be added to all queries. However, we recommend you put your key in SSAddin.xll.config instead, so you don’t indavertently share your key when sharing your spreadsheet.
tiingo: column B should bequeryorconfigquery: column C should be the unique QueryKey that’s passed to thes2tiingofunction, column D should betickerand column E should be a ticker symbol egmsftoraapl. The ticker symbol should be lower case. Column F should beroot, followed bydailyorfundsin column G. Column H is optional. If it’s present it should beleafand then column I should beprices. If it’s absent a tiingo query that gets meta data for the symbol will be dispatched. Finally, columns J, K, L & M can be used to specify startDate and endDate for historical price queries.config: column pairs from C & D onwards are reserved for name value pairs that apply to all queries or Tiingo web socket connections (see twebsock below). Supported config keys are...auth_token: putauth_tokenin column C, and your actual key in column D for it to be added to all queries or used by twebsock.http_proxy_host: if this appears in column C then column D should give a proxy hostname. SSAddin will then connect via the proxy rather than direct to the internet.http_proxy_port: port for the proxy connection.http_proxy_user: user name for the proxy connection. Often this is in DOMAINUSER format for Windows Active Directory user IDs.http_proxy_password: password for the proxy connection.
baremetrics: column B should bequeryorconfigquery: column C should be the unique QueryKey that’s passed to thes2baremetricsfunction, column D should beqtypeand column E should be asummary,planormetric. For a qtype ofplanormetricyou need a following key/value pair that specifies which metric. The key, in column F should bemetric, and then in column G you should specifymrr, arpu`,ltvor any of the available metrics. Columns J, K, L & M can be used to specifystart_dateandend_datewith the date values in columns K and M supplied bys2todayor handcoded yyy-MM-dd strings. Don’t use Excel’s own TODAY function for these as it’s volatile and will cause an endless calc cycle. Finally, if you’re testing against the Sandbox API putsandboxin column L andTRUEin column M and ensure you have your Sandbox API key in SSAddin.xll.config. Don’t forget to removesandbox:TRUEand switch the API key in SSAddin.xll.config when you’ve finished testing!config: column pairs from C & D onwards are reserved HTTP proxy settings. See details fortiingoabove.
twebsock: when column B containstiingothen column C specifies aSockKeyto pass tos2twebsock. Column D should give the URL for the Tiingo API socket egwss://api.tiingo.com/iexcron: when column B containstabthen column C should have a uniqueCronKeythat will be passed to thes2cronworksheet function which will then get the cron job specification from columns D to K. This job spec is then passed to SSAddin’s internal NCrontab implementation. Bear in mind that SSAddin uses a hacked version of NCrontab that extends the spec to add seconds.D: secondsE: minutesF: hoursG: daysH: monthI: weekdayJ: start - defaults to the start of today, today being the day when the process started.K: end - defaults to the end of today
websock: when column B containsurlthen column C specifies aSockKeyto pass tos2websock. Column D should give the hostname of a SpreadServe server, column E the port number, and column F the rest of the URL, often referred to as the path.
Note that if column B has any other value than described above it will be ignored. One convention
you’ll see in the SSAddin example s2cfg sheets is comment occurring in column B so that the
rest of the row can be used as headers to describe the real values below.