This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Creating Dynamic Columns challenge | |
function main(workbook: ExcelScript.Workbook) { | |
// Extract | |
const selectedSheet = workbook.getWorksheet("Challenge") | |
const source = selectedSheet.getTable("Source") | |
let names = source.getColumnByName("Name") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// variants to https://gist.github.com/havishmad/0f8e5f785146633f0f8533b5820dd0fe | |
insertBlankRows= | |
LAMBDA( data, | |
LET( | |
columnsInRange, COLUMNS(data), | |
emptyRow, IF( SEQUENCE(, columnsInRange ), ""), | |
rowsInRange, ROWS( data ), | |
addEmptyRow, VSTACK( TAKE( data, 1), emptyRow), | |
IF( rowsInRange = 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Partly taken from samples to AFE | |
https://github.com/microsoft/advanced-formula-environment | |
more exactly from | |
https://github.com/microsoft/advanced-formula-environment/blob/main/examples/Lib.md | |
*/ | |
// ====================================================================================================== | |
// Timing a computation wrapped in a thunk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FillUp/FillDown column range functions | |
Sergei Baklan | |
Updated 2022-03-05 | |
-------------------------------------------------------*/ | |
/* | |
FUNCTION NAME: IFBLANK | |
based on Chris Gross function | |
https://gist.github.com/chgrossMSFT/d172fd552cf6893bcdc7942223cb0e55 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Waiting for a native function simple SPLITTEXT() is here. | |
- no error handling | |
- no help string | |
- separators between quotes are not ignored | |
Use: | |
=SPLITTEXT( text, separators ) | |
if separator is missed comma is taken by default | |
examples: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
calc(n) - integrates aggregation function with | |
BYROW() or BYCOL(), where | |
n - number of aggregation function | |
That is simple sample without error handling | |
and help output. | |
Used as: | |
=BYROW( range, calc(n) ) |