From 61c26857583304e3dd991d010d09bb42631811a6 Mon Sep 17 00:00:00 2001 From: Dishant Langayan Date: Mon, 27 Apr 2020 18:46:02 -0400 Subject: [PATCH] Completing README, and added register & unregister scripts. --- README.md | 63 ++++++++++++++++++++++++++++ SolaceRTDExcel.sln | 11 ++++- SolaceRTDExcel/SolaceRTDExcel.csproj | 20 ++++++++- SolaceRTDExcel/register.bat | 3 ++ SolaceRTDExcel/unregister.bat | 3 ++ 5 files changed, 97 insertions(+), 3 deletions(-) create mode 100644 SolaceRTDExcel/register.bat create mode 100644 SolaceRTDExcel/unregister.bat diff --git a/README.md b/README.md index 6b8681f..5d2c79b 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file diff --git a/SolaceRTDExcel.sln b/SolaceRTDExcel.sln index f45f46a..d090696 100644 --- a/SolaceRTDExcel.sln +++ b/SolaceRTDExcel.sln @@ -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 @@ -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 diff --git a/SolaceRTDExcel/SolaceRTDExcel.csproj b/SolaceRTDExcel/SolaceRTDExcel.csproj index ce89205..b0f5fae 100644 --- a/SolaceRTDExcel/SolaceRTDExcel.csproj +++ b/SolaceRTDExcel/SolaceRTDExcel.csproj @@ -61,6 +61,16 @@ 4 true + + pdbonly + true + bin\x86\Release\ + TRACE + prompt + 4 + true + x86 + ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1000\lib\net20\Microsoft.Office.Interop.Excel.dll @@ -107,6 +117,9 @@ + + PreserveNewest + Always @@ -115,6 +128,9 @@ PreserveNewest + + PreserveNewest + @@ -125,6 +141,8 @@ - %25SystemRoot%25\Microsoft.Net\Framework\v4.0.30319\RegAsm.exe $(ProjectDir)bin\x86\Debug\SolaceRTDExcel.dll /tlb /codebase + %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) \ No newline at end of file diff --git a/SolaceRTDExcel/register.bat b/SolaceRTDExcel/register.bat new file mode 100644 index 0000000..513d727 --- /dev/null +++ b/SolaceRTDExcel/register.bat @@ -0,0 +1,3 @@ +C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe %~dp0\SolaceRTDExcel.dll /tlb /codebase + +Pause \ No newline at end of file diff --git a/SolaceRTDExcel/unregister.bat b/SolaceRTDExcel/unregister.bat new file mode 100644 index 0000000..551b301 --- /dev/null +++ b/SolaceRTDExcel/unregister.bat @@ -0,0 +1,3 @@ +C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm.exe /u %~dp0\SolaceRTDExcel.dll + +Pause \ No newline at end of file