Skip to content

Instantly share code, notes, and snippets.

View govert's full-sized avatar

Govert van Drimmelen govert

  • Excel-DNA
  • Johannesburg, South Africa
View GitHub Profile
@govert
govert / FastChannel.cs
Created September 19, 2020 21:38 — forked from Manuel-S/FastChannel.cs
Fast Shared Memory Remoting by Joseph Albahari
using System.Threading.Tasks;
using System.IO.MemoryMappedFiles;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
async Task Main()
{
using (var channel = DemoServer())
@govert
govert / SetValuePerf.cs
Last active July 2, 2020 20:45
Excel-DNA: Test ExcelReference.SetValue performance
using System;
using System.Diagnostics;
using ExcelDna.Integration;
using static ExcelDna.Integration.XlCall;
namespace SetValuePerf
{
public static class Macros
{
@govert
govert / Test.vb
Created August 20, 2019 09:57
VB.NET Test for Google Groups question
Option Explicit On
Imports ExcelDna.Integration ' for ExcelDnaUtil, XlCall, etc
Imports System.Math
Imports System.Runtime.InteropServices ' for <ComVisible(True)>
Imports ExcelDna.Integration.CustomUI ' needed for IRibbonControl
Imports DNAIRibbonControl = ExcelDna.Integration.CustomUI.IRibbonControl ' needed for IRibbonControl
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Core
Imports Microsoft.Office.Interop.Excel ' Các giao diện như Workbook, Range
Module Globals
@govert
govert / ObservableClock.cs
Last active December 1, 2017 22:06
Test code for Excel-DNA IExcelObservable
using System;
using System.Diagnostics;
using System.Threading;
using ExcelDna.Integration;
namespace TestDisposable
{
public static class RtdClock
{
[ExcelFunction(Description = "Provides a ticking clock")]
@govert
govert / FSharpTest.ipynb
Last active June 29, 2016 23:08
F# Feature Notebook Test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@govert
govert / linear-regression.ipynb
Created June 29, 2016 23:04
Linear regression sample from EFavDB/linear-regression
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@govert
govert / Excel-DNA Used Range.cs
Last active June 20, 2016 07:11
Uses the C API to retrieve the used range for a sheet, and intersect with a passed-in ExcelReference
using ExcelDna.Integration;
using static System.Math;
using static ExcelDna.Integration.XlCall;
public static class TestFunctions
{
[ExcelFunction(Description = "Returns the sum of cells in the target (using the used range for performance)", IsMacroType = true)]
public static object GetUsedSum([ExcelArgument(AllowReference = true)] object target)
{
// NOTE: This function will be volatile by default,
@govert
govert / RTD DisconnectData array issue.md
Last active December 12, 2018 14:14
RTD calls made from an array formula do not disconnect properly

Overview

The issue concerns the behaviour of Excel's RTD feature when:

  • the RTD call is made from a wrapper function,
  • the wrapper function is called from an array formula, and
  • in one of the calculation calls, the wrapper function does not make an RTD call.

The expected behaviour is that the RTD server gets a DisconnectData call for the relevant RTD topic.

The observed behaviour is that the RTD server does not get a DisconnectData call.