Introduction
Many objects used in QuantSA are more complex than strings, dates or numbers that can be typed into cells in a spreadsheet. Most of the required conversions take place in QuantSA.Excel.ExcelUtilities
. The two main special types are:
- Types that can be created directly from strings, and
- Types that need to be created by a call to QuantSA and the name of the object is placed in the spreadsheet.
Types from strings
Objects such as daycount conventions, calendars or floating rate indices can be made directly from strings. These types are all described here
Adding a new type that can be created from a string.
When adding a new type that can be created from a string one needs to do the following things:
- Write a converter for this type in
QuantSA.Excel.ExcelUtilities
- Add the type to
QuantSA.Excel.ExcelUtilities.InputTypeShouldHaveHelpLink
- Update the XL code generator at
GenerateXLCode.TypeInformation.InputTypeHasConversion
- Update the help generator at
PrepareRelease.MarkdownGenerator.InputTypeShouldHaveHelpLink
- Write a page for the new type in
\Documentation\pages\excel
, this page should describe what values are permissable - Update
\Documentation\_data\sidebars\excel_sidebar.yml
to point to this new page.
Objects created by QuantSA
These are all handled automatically, if you add an excel function that returns some complex object and allow the excel wrapper code to be generated automatically as described in Exposing Functions to Excel. Similarly if your function requires a complex object as an input, that too will be handled automatically if the excel wrapper code is generated.