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
,websock
ortwebsock
. - Depending on the value in column A there are different expectations for the values in
column B onwards.
quandl
: column B should bequery
orconfig
query
: column C should be the unique QueryKey that’s passed to thes2quandl
function, column D should bedataset
and column E should name a Quandl dataset egFRED/DED1
orOPEC/ORB
. Any further columns should give key value pairs to tacked on to the Quandl query URL after the?
For instance column F could berows
and column G5
so that?rows=5
is 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_token
is supported. If you putauth_token
in 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 bequery
orconfig
query
: column C should be the unique QueryKey that’s passed to thes2tiingo
function, column D should beticker
and column E should be a ticker symbol egmsft
oraapl
. The ticker symbol should be lower case. Column F should beroot
, followed bydaily
orfunds
in column G. Column H is optional. If it’s present it should beleaf
and 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_token
in 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 bequery
orconfig
query
: column C should be the unique QueryKey that’s passed to thes2baremetrics
function, column D should beqtype
and column E should be asummary
,plan
ormetric
. For a qtype ofplan
ormetric
you 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`,ltv
or any of the available metrics. Columns J, K, L & M can be used to specifystart_date
andend_date
with the date values in columns K and M supplied bys2today
or 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 putsandbox
in column L andTRUE
in column M and ensure you have your Sandbox API key in SSAddin.xll.config. Don’t forget to removesandbox:TRUE
and 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 fortiingo
above.
twebsock
: when column B containstiingo
then column C specifies aSockKey
to pass tos2twebsock
. Column D should give the URL for the Tiingo API socket egwss://api.tiingo.com/iex
cron
: when column B containstab
then column C should have a uniqueCronKey
that will be passed to thes2cron
worksheet 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 containsurl
then column C specifies aSockKey
to 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.