Skip to content

Commit

Permalink
Completing README, and added register & unregister scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
dishantlangayan committed Apr 27, 2020
1 parent cf2d4a8 commit 61c2685
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 3 deletions.
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,65 @@
# SolaceRTDExcel

A RealTimeData Server for streaming data from PubSub+ Event Brokers into Excel.

## Overview

Microsoft Excel provides a new worksheet function, RTD, that allows you to call a Component Object Model (COM) Automation server for the purpose of retrieving data real-time. This project builds a RTD server for streaming data from PubSub+ Event Brokers.

Currently, it can only parse Solace messages with JSON payloads, but support for other types can be easily added.

NOTE: The Solace RTD function is only supported in Windows OS x86 platforms, and cannot be deployed on a MacOS or other OS.

## Usage

```
=RTD("Solace.RTD", "", "my/topic", "SomeKey")
```

Parameters:
* The first parameter tells Excel to call our Solace RTD function. This value should always be `Solace.RTD`
* The second parameter is always empty as we are running our function on the local machine
* The third parameter is the complete Solace Topic to subscribe and stream data from
* The fourth parameter is the key for which we want to retrieve the value. It is assumed that messages publish are in JSON format and have key-value pairs as the payload.

## Configuration

Before you add the first RTD function in Excel, you must configure the connection to a PubSub+ Broker from which you want to stream the data.

The configuration is set in the `SolaceRTDExcel.dll.config` file. The required config property to set are:
* host: the IP & Port of the PubSub+ Broker
* messageVpn: the Solace Message-VPN to connect to on the above broker
* username: the client-username to use for authentication

All other properties are optional but should be still be specified in the config file.

## Installing

1. Unzip the package downloaded from GitHub project
2. Run the `register.bat` script as an Administrator (right click on file and select Run as Administrator) to register Solace RTD with your Excel
3. Set the PubSub+ Broker configuration in `SolaceRTDExcel.dll.config` file
3. Open Excel

To unregister, run `unregister.bat` as an Administrator

## Logging

By default all logs are redirected to a file on the C:\ drive:

`C:\SolaceRTD.log`

## License

Copyright 2020 Dishant Langayan

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
11 changes: 9 additions & 2 deletions SolaceRTDExcel.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolaceRTDExcel", "SolaceRTDExcel\SolaceRTDExcel.csproj", "{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{507450C2-BC1C-43AD-94B7-C30B13E4B6AF}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -25,8 +32,8 @@ Global
{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}.Release|Any CPU.Build.0 = Release|Any CPU
{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}.Release|x64.ActiveCfg = Release|Any CPU
{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}.Release|x64.Build.0 = Release|Any CPU
{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}.Release|x86.ActiveCfg = Release|Any CPU
{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}.Release|x86.Build.0 = Release|Any CPU
{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}.Release|x86.ActiveCfg = Release|x86
{930BFDA2-C2DA-42DC-BE83-BB4E960875B0}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
20 changes: 19 additions & 1 deletion SolaceRTDExcel/SolaceRTDExcel.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
Expand Down Expand Up @@ -107,6 +117,9 @@
<Compile Include="SolaceConnection.cs" />
</ItemGroup>
<ItemGroup>
<None Include="register.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="SolaceRTDExcel.dll.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand All @@ -115,6 +128,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<None Include="unregister.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\SolaceSystems.Solclient.Messaging.10.8.0\build\net20\SolaceSystems.Solclient.Messaging.targets" Condition="Exists('..\packages\SolaceSystems.Solclient.Messaging.10.8.0\build\net20\SolaceSystems.Solclient.Messaging.targets')" />
Expand All @@ -125,6 +141,8 @@
<Error Condition="!Exists('..\packages\SolaceSystems.Solclient.Messaging.10.8.0\build\net20\SolaceSystems.Solclient.Messaging.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SolaceSystems.Solclient.Messaging.10.8.0\build\net20\SolaceSystems.Solclient.Messaging.targets'))" />
</Target>
<PropertyGroup>
<PostBuildEvent>%25SystemRoot%25\Microsoft.Net\Framework\v4.0.30319\RegAsm.exe $(ProjectDir)bin\x86\Debug\SolaceRTDExcel.dll /tlb /codebase</PostBuildEvent>
<PostBuildEvent>%25SystemRoot%25\Microsoft.Net\Framework\v4.0.30319\RegAsm.exe $(ProjectDir)bin\x86\Release\SolaceRTDExcel.dll /tlb /codebase
copy $(SolutionDir)README.md $(ProjectDir)$(OutDir)
copy $(SolutionDir)LICENSE $(ProjectDir)$(OutDir)</PostBuildEvent>
</PropertyGroup>
</Project>
3 changes: 3 additions & 0 deletions SolaceRTDExcel/register.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe %~dp0\SolaceRTDExcel.dll /tlb /codebase

Pause
3 changes: 3 additions & 0 deletions SolaceRTDExcel/unregister.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /u %~dp0\SolaceRTDExcel.dll

Pause

0 comments on commit 61c2685

Please sign in to comment.