Skip to content

Instantly share code, notes, and snippets.

@JeancarloFontalvo
JeancarloFontalvo / checkbox-textual.gist.js
Created Jan 28, 2019
Append a label next to each checkboxes
View checkbox-textual.gist.js
var checkboxes = $('input[type="checkbox"]');
checkboxes.each((item, element) => {
element = $(element);
var value = element.is(":checked");
element.after(`<span class='text-white label label-${value ? "primary": "danger"}'>${value ? "SI": "NO"}</span>`);
})
@JeancarloFontalvo
JeancarloFontalvo / validator.gist.gs
Created Jan 28, 2019
Formula for validating a cell with the J2 Format
View validator.gist.gs
-- J2 = "Alfanumerico|6|SI|SI|Personalizado"
--FORMULA
=Y(
SI(
SI.ERROR(HALLAR("Alfa"; J2); -1) <> -1;
VERDADERO;
SI(
SI.ERROR(HALLAR("Numerico"; J2); -1) <> -1;
REGEXMATCH(TO_TEXT(K2); "^(\d+)$");
@JeancarloFontalvo
JeancarloFontalvo / export-named-sheet-as-csv.gs
Created Jan 28, 2019 — forked from mrkrndvs/export-named-sheet-as-csv.gs
Google apps script to export an individual sheet as csv file
View export-named-sheet-as-csv.gs
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];