Skip to content

Instantly share code, notes, and snippets.

@brendano
brendano / xlsx2tsv.py
Created November 7, 2008 02:53
xlsx2tsv: python command-line script to convert xlsx (Excel "OOXML") into tab-separated values
#!/usr/bin/env python
"""
xlsx2tsv filename.xlsx [sheet number or name]
Parse a .xlsx (Excel OOXML, which is not OpenOffice) into tab-separated values.
If it has multiple sheets, need to give a sheet number or name.
Outputs honest-to-goodness tsv, no quoting or embedded \\n\\r\\t.
One reason I wrote this is because Mac Excel 2008 export to csv or tsv messes
up encodings, converting everything to something that's not utf8 (macroman
@donmccurdy
donmccurdy / .block
Last active January 31, 2023 21:02
perlin noise, animated lines, and SVG filters
license: mit
@AlexJerabek
AlexJerabek / Get file (using slicing).yaml
Created September 6, 2018 15:57
Use slicing to get the byte array and base64-encoded string that represent the current document. - Shared with Script Lab
name: Get file (using slicing)
description: Use slicing to get the byte array and base64-encoded string that represent the current document.
author: AlexJerabek
host: EXCEL
api_set: {}
script:
content: |-
$("#setup").click(() => tryCatch(setup));
$("#get-file").click(() => tryCatch(getCurrentFile));
$("#new-workbook-from-file").click(() => tryCatch(newWorkbookFromFile));
@codediodeio
codediodeio / config.js
Last active April 7, 2025 00:44
Snippets from the Firestore Data Modeling Course
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
@vlrmprjct
vlrmprjct / counter.ino
Created July 31, 2020 07:33
Arduino Simple Counter
/* Simple Counter
* ——————
*
* This is a simple counter that takes a digital input
*
*/
int ledPin = 13; // choose the pin for the LED
int switchPin =2; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
int counter = 0;
@CHatmaker
CHatmaker / BXL 5g Functions LAMBDA for Excel CrtIdxλ
Last active July 20, 2025 08:08
BXL 5g Functions LAMBDA for Excel: CrtIdxλ
/* FUNCTION NAME: CrtIdxλ
DESCRIPTION:*/ /**Creates an array of indexes that can be used with INDEX() can combine
all rows in all tables as would a database 'Natrual Join' or 'Cross Join.'*/
/* This was developed for multidimensional modeling. A key to multidimensional modeling
is the ability to combine all instances of all dimensions, and then access each
dimension's value. A dimension is a category of things like:
Customers, Products, Regions, Months, etc.
When faced with the situation where each dimension has a piece of information needed
for a particular calculation such as:
@CHatmaker
CHatmaker / BXL LAMBDA Reporting with Arrays
Last active July 3, 2025 12:20
5G functions for Excel for Reporting with Arrays
/* FUNCTION NAME: Aboutλ
DESCRIPTION:*//**Displays the URL to this module's Gist which includes documentation*/
/* REVISIONS: Date Developer Description
Mar 17 2023 Craig Hatmaker Copyright
Apr 17 2023 Craig Hatmaker Reorganizing and adding help
Jul 03 2023 Craig Hatmaker See nFoldCartProdλ and PriorDimProdλ
Jul 11 2023 Craig Hatmaker See UnPivotDetailλ
Feb 11 2024 Craig Hatmaker See UnPivotDetailλ
*/
class PathMe {
moves: string[] = [];
constructor() {
this.moves = [];
return this;
}
moveTo(x: number, y: number) {
@CHatmaker
CHatmaker / BXL 5g Functions LAMBDA Workbook Info
Last active August 18, 2025 01:37
BXL 5g Functions LAMBDA for Excel Workbook Information
/* FUNCTION NAME: Aboutλ
DESCRIPTION:*//**Displays the URL to this module's Gist which includes documentation*/
/* REVISIONS: Date Developer Description
Dec 14 2023 Craig Hatmaker Original Development
*/
Aboutλ = TRIM(TEXTSPLIT(
"About: →BXL's Workbook Information module. Suggested module name: BXW¶" &
"Version: →Jun 12 2023¶" &
"Gist URL: →https://gist.github.com/CHatmaker/3ff1b5ce97344c2dfc3f1623a656676a ¶" &
@CHatmaker
CHatmaker / BXL 5g Functions LAMBDA Modeling Templates
Last active August 18, 2025 01:36
BXL 5g Functions LAMBDA Modeling Templates
// Base Template
/* FUNCTION NAME: <enter name here>λ
DESCRIPTION:*//**<this comment displays in name manager>*/
/* REVISIONS: Date Developer Description
<changed> <your name> <what changed>
*/
BaseTemplateλ = LAMBDA(
// Parameter Declarations