The Quandl Excel Add-In allows you to search through, find and download any of Quandl's millions of datasets directly from within Microsoft Excel. It's completely free; usage is unlimited and unrestricted. Currently this Add-in is limited to windows only as it uses features and functions which are only available on the windows version of excel.
A few things that will make your excel development experience much easier:
- Excel is single threaded
- Use Async tasks and don't block with long running code. This will block the Excel UI due to it being single threaded.
- When making calls to excel via ExcelDNA thing of Excel as the
server
and our ExcelDNA app as theclient
. Design your application as if you are makingrequests
of excel which it may or may not fulfill. Also not that the Excelserver
can be busy (overloaded) due to its single threaded nature and you may need to wait and retry your call later to fulfill it.
-
Download DigiCert Utility if not already done. https://www.digicert.com/util
-
Create CSR
-
Submit the CSR to DigiCert order and re-issue certificate
-
Download the certificate as .p7b file and import it into the utility.
-
Export it has a pfx file in order to use it when signing the code.
- Install Add-in Express for Office and .NET from [https://www.add-in-express.com/downloads/adxnet.php]. Any edition will work. Note that trial version is not available, you need to purchase your license.
- Install WiX toolset from http://wixtoolset.org/.
- Right click solution file and select
Restore NuGet Packages
(If you don't have NuGet, please install it at https://dist.nuget.org/index.html) - Make sure that you have
ildasm
tool from Microsoft SDK installed. You need it to sign assemblies with strong name (see the next step). The solution has been tested with SDK 10.0A - Modify
3rdparty\makesn.cmd
to change path to SDK folder (forsn.exe
,ildasm.exe
tools) and possibly to Microsoft.NET folder (forilasm.exe
tool), if appropriate. - Run
3rdparty\makesn.cmd
. It should create strongly signed versions ofMarkdown.Xaml.dll
,octokit.dll
,SharpRaven.dll
andSyroot.Windows.IO.KnownFolders.dll
. - Make sure adxloader64 and adxloader are copied in Quandl.Excel.Addin\Loader directory. You can find them in C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Redistributables
- Make sure dpca.dll is copied (should be in the Downloads folder of the Windows VM) to Quandl.Excel.AddinSetup\4.0.0\Resources.
- Make sure vdwtool.exe (should be in C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Redistributables) is copied to Quandl.Excel.AddinSetup\4.0.0\Resources.
- Go to the project properties for
Quandl.Excel.Addin
- Click on signing tab
- Click
Create Test Certificate
without a password - Repeat 3 last steps for
Quandl.Excel.Console
- Go to the project properties for
Quandl.Excel.UDF.Functions
- Under
Debug
change theStart Action
fromStart Project
toStart External Program
- Fill in the path to your chosen version of Excel in the Textbox
- Under
Start Options
in theCommand Line Arguments
text field enterQuandl.Excel.UDF.Functions-AddIn.xll
- Whitelist your development plugin in Excel
- Open Excel
- Click
File -> Options -> Truste Center
- Click
Trust Center Settings
- Click
Trusted Locations -> Add New Location
- Enter the root directory of your project, example
C:\Users\Developer\Projects\quandl-excel-windows\
- Ensure
Subfolders of this location are also trusted
is checked - Click OK
- You should now be able to build the project.
Following steps will create a setup package which works for both Microsoft Excel 32 bit and 64 bit.
- Ensure the setup project is signed
Quandl.Excel.Addin.Setup -> 6 Prepare for Release => Releases => SingleImage => Signing
- See SIGNING
- In the middle of this process you will need to actually build the addin:
- First you should do: Have 6 out 8 projects loaded. Proceed to “rebuild” main solution ‘quandl-excel-windows-adx’.
- During the break in signing script, when prompted to build the actual AddinSetup installer, do: “Build” the Quandl.Excel.AddinSetup project
- Navigate to
Quandl.Excel.Addin.Setup -> Product.wxs
- Change the product code (use the helper -
{...}
) - Bump the version number. * Be sure to leave the upgrade code untouched.
- Navigate to the
Quandl.Excel.Addin -> Properties => Publish
and update the version to match the setup version. - Navigate to the
Quandl.Shared.Modules -> Utilities => ReleaseVersion
and update the version to match the setup version. - Switch your
Run Mode
torelease
instead ofdebug
- Right click solution file and select
Rebuild Solution
Things to note:
- You might need to kill processs
msbuild.exe
to recompile the solution. - ProductId is set to
*
inQuandl.Excel.AddinSetup -> Product.wsx
- we are using Markdown.XAML to generate the flowdocument from the github markup. For more info check out the github page.
- When testing, if your plugin does not appear in Excel, check that it was not added to the
Disabled Items
list. To check:- Open Excel
- Click
File -> Options -> Add-Ins
- Under the
Manage
dropdown, selectDisabled Items
and clickGO
- Enable any instance of the Quandl Add-In that appear there
For a list of excel exceptions and how to debug them please see: Errors
This could be a number of things but generally means that our implementation has run into one of the following problems:
- Unhandled excel exception - Excel has many mysterious exceptions that result in COMException errors. If left unhandled they can crash excel or stop the running UDF.
- Threading deadlock - This can happen if we use our threads in a non thread safe way. Basically we are not handling a specific case properly.
- Excel request deadlock - This can occur when excel is busy and we try to make another request to it from a different thread.
- Unhandled server error response - Our server is having issues and after a few retries our code simply gives up.
See LICENCE file for licence rights and limitations (MIT)