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 / EXCEL_VBA_AGENTIC_CODING.md
Created February 16, 2026 08:54
Excel/VBA Agentic Coding Guide

Excel/VBA Agentic Coding Guide (from a real build/debug session)

Purpose

This document captures practical lessons from building a non-trivial .xlsm with generated VBA modules, Excel COM automation, and iterative debugging.
It is meant for:

  • Expert Excel/VBA developers starting with agentic coding workflows
  • Prompt engineers directing coding agents on Excel/VBA tasks

It focuses especially on how to handle compilation errors fast.

@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
Loading
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
Loading
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.

@govert
govert / Excel-DNA CLA.md
Created September 26, 2015 22:08
Excel-DNA Contributor License Agreement

Contributor License Agreement (CLA)

This CLA specifies how the Excel-DNA project is allowed to use your code.

When you make a contribution to the Excel-DNA project, you agree:

  1. The code you wrote is your original work (you own the copyright) or you otherwise have the right to submit the work.

  2. To grant the Excel-DNA project and its coordinator(s) a nonexclusive, irrevocable license to use your submitted code in any way.

  3. You are capable of granting these rights for the contribution.