Skip to content

Instantly share code, notes, and snippets.


bruce mcpherson brucemcpherson

View GitHub Profile
brucemcpherson / restLibrary.xml
Last active Sep 28, 2022
Excel restlibrary manifest -- also needs the cdataset manifest. See Excel liberation.
View restLibrary.xml
<gistThat info="this is a manifest for gistThat VBA code distribution - see for details">
<manifest description="restlibrary associated classes and modules" contact="">
<item3 gistid="3423912" version="" filename="cBrowser.cls" module="cBrowser" type="class"/>
<item1 gistid="3423885" version="" filename="restLibrary.vba" module="restLibrary" type="module"/>
<item18 gistid="b72f7a826d553fb46cfa" version="" filename="cDbab.cls" module="cDbab" type="class"/>
<item19 gistid="b72f7a826d553fb46cfa" version="" filename="cDbabResult.cls" module="cDbabResult" type="class"/>
<item2 gistid="3423885" version="" filename="cRest.cls" module="cRest" type="class"/>
brucemcpherson /
Created Aug 15, 2012
Google Apps Script equivalents for common VBA function
/** @description
* javaScript/Google Apps script functions that are equivalent to common VBA functions
* in general these provide the same functionality and have the same calling stack
* See for more details
* @author <a href="">Bruce McPherson</a><a href=""></a>
* Removes leading and trailing whitespace
* @param {string|number} v the item to be trimmed
brucemcpherson / usefulStuff.vba
Last active Jan 25, 2022
Useful procedures and functions - usefulStuff.vba
View usefulStuff.vba
' :do not modify this line - see for details: updated on 8/18/2014 3:54:19 PM : from manifest:7471153 gist
Option Explicit
' v2.23 3414346
' Acknowledgement for the microtimer procedures used here to
' thanks to Charles Wheeler -
' ---
#If VBA7 And Win64 Then
brucemcpherson / cRest.cls
Last active Jul 29, 2021
Excel rest library
View cRest.cls
' :do not modify this line - see for details: updated on 15/10/2013 10:52:06 : from manifest:5055578 gist
' This is a generalized class for dealing with rest queries
Option Explicit
' v2.13
'for more about this
'to contact me
'reuse of code
brucemcpherson / usefulColorStuff.vba
Last active Jul 6, 2021
useful color manipulation functions for VBA
View usefulColorStuff.vba
' :do not modify this line - see for details: updated on 28/02/2013 09:55:55 : from manifest:3414394 gist
' this is all about colors
Option Explicit
' v2.7 3414615
Public Type colorProps
' this is a single type to hold everything i know how to calculate about a color
rgb As Long
red As Long
green As Long
brucemcpherson / cCell.cls
Last active Jun 1, 2021
cDataSet - VBA abstraction of Excel worksheet model
View cCell.cls
' :do not modify this line - see for details: updated on 14/11/2013 18:02:03 : from manifest:3414394 gist
' a data Cell - holds value at time of loading, or can be kept fresh if there might be formula updates
Option Explicit
' Version 2.04 -
'for more about this
'to contact me
'reuse of code
brucemcpherson / scriptDbCom.xml
Last active Apr 11, 2021
gistthat manifest for scriptdbcom - VBA scriptDB API
View scriptDbCom.xml
<gistThat info="this is a manifest for gistThat VBA code distribution - see for details">
<manifest description="cDataset and associated classes and modules" contact="">
<item1 gistid="3414216" version="" filename="cCell.cls" module="cCell" type="class" />
<item2 gistid="3414216" version="" filename="cDataSet.cls" module="cDataSet" type="class" />
<item3 gistid="3414216" version="" filename="cDataSets.cls" module="cDataSets" type="class" />
<item4 gistid="3414216" version="" filename="cDataColumn.cls" module="cDataColumn" type="class" />
<item5 gistid="3414216" version="" filename="cDataRow.cls" module="cDataRow" type="class" />
<item6 gistid="3414216" version="" filename="cHeadingRow.cls" module="cHeadingRow" type="class" />
<item7 gistid="3414346" version="" filename="" module="usefulStuff" type="module" />
View usefulHtmlConverters.vba
Option Explicit
'v1.1 - 5116003
Private Function testTableToHtml()
Dim content As String, fn As String, _
sheetName As String, maxrows As Long, styles As String, _
outputType As String
' an example of how to use these
' you could make a form or dialog to set these up
' name of worksheet containing the data
sheetName = "sankey"
brucemcpherson / usefulChartStuff.vba
Last active Apr 11, 2021
useful chart stuff - for more info see
View usefulChartStuff.vba
Option Explicit
' v2.01 -
Public Function createSurfaceChart(ds As cDataSet, n As String, _
Optional xlt As Long = xlSurface, _
Optional targetLegends As Long = 0, _
Optional colorRampName As Variant = "heatmap", _
Optional showLegend As Boolean = False, _
Optional brighten As Double = 1, _
Optional showAxis As Boolean = True) As Chart