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 / gist:b5faa8e26c8d2a5844dd
Last active August 29, 2015 14:01
Excel-DNA file layout for source text reference
<DnaLibrary Name="Excel JSON Client" RuntimeVersion="v4.0" >
<Project Language="VB" >
<Reference Path="Newtonsoft.Json.dll" />
<SourceItem Path="excel-json-client.vb" />
</Project>
</DnaLibrary>
@govert
govert / AsyncCaller.cs
Created July 2, 2015 21:39
A sample about recovering caller information for async calls, and the effect of different async keys
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using ExcelDna.Integration;
using ExcelDna.Logging;
namespace AsyncCaller
@govert
govert / ExcelDna.Samples.ComAddIn.dna
Created July 13, 2011 07:38
Excel-DNA (http://excel-dna.net) sample showing how to make a COM Add-In inside the Excel-DNA .xll. Includes reflection-based workaround for version 0.29.
<DnaLibrary RuntimeVersion="v4.0" Language="C#">
<Reference Name="System.Windows.Forms" />
<![CDATA[
using System;
using System.Reflection;
using SWF = System.Windows.Forms;
using ExcelDna.Integration;
using ExcelDna.Integration.CustomUI;
using ExcelDna.Integration.Extensibility;
@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.

@govert
govert / AddInHost.dna
Created September 7, 2011 09:48
Excel-DNA (http://excel-dna.net) sample showing how to load/unload other add-ins from a host add-in
<DnaLibrary Name="AddInHost" Language="C#" RuntimeVersion="v4.0">
<Reference Name="System.Windows.Forms" />
<![CDATA[
using System;
using System.Windows.Forms;
using ExcelDna.Integration;
public class MyMacros
{
@govert
govert / RangeConvert.dna
Created June 28, 2012 16:47
Excel-DNA - Range processing via COM, with .NET 4 'dynamic'
<DnaLibrary Name="RangeConvert" Language="C#" RuntimeVersion="v4.0">
<Reference Name="System.Windows.Forms" />
<![CDATA[
using System;
using System.Windows.Forms;
using ExcelDna.Integration;
public static class TestRangeMacros
{
@govert
govert / RangeConvertCAPI.dna
Created June 28, 2012 16:48
Excel-DNA - Range processing via the C API
<DnaLibrary Name="RangeConvert using C API" Language="C#" RuntimeVersion="v4.0">
<Reference Name="System.Windows.Forms" />
<![CDATA[
using System;
using System.Windows.Forms;
using ExcelDna.Integration;
public static class TestRangeMacros
{
@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 / 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 / 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.