This file contains hidden or 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
/** | |
* Формат телефона из | |
* +7(999) 888-77-66 | |
* в | |
* 89998887766 | |
*/ | |
function get_NU_PhoneNumber(range) { | |
let value = Array.isArray(range) ? range.flat() : [range] | |
return value.map(v => [v.replace("+7", "8").replace(/\D/g, "")]) | |
} |
This file contains hidden or 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
function parseHeaderNames({headerNames=[],delimetr='!'}={}){ | |
var headerNamesArr=headerNames.map(h=>h.split(delimetr)) | |
var headersObj=fromEntries(headerNamesArr) | |
return {headerNamesArr,headersObj} | |
} |
This file contains hidden or 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
/* | |
* Copyright 2017 Mohsen Mesgarpour | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or 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
function getLastRow(data, column) { | |
var max = data.length; | |
var x = data.length | |
for (x in data) { | |
if (data[x][column - 1]) { | |
max = x * 1 + 1; | |
}; | |
max -= max; | |
} | |
This file contains hidden or 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
function doGet() { | |
return HtmlService.createHtmlOutputFromFile('Index') | |
.setSandboxMode(HtmlService.SandboxMode.IFRAME); | |
} | |
function doSomething() { | |
Logger.log('I was called!'); | |
} |
This file contains hidden or 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
function testIKB(){ | |
var id='1vaRqCJNhLQs5BeaZWU652BbUsHNM_ksQhawu5KFJZSk'; | |
if (id!== undefined){ | |
var ss=SpreadsheetApp.openById(id); | |
} | |
else{ | |
var ss=ss||SpreadsheetApp.getActiveSpreadsheet(); | |
} | |
var signature=signature||'InlineKeyboard' |
This file contains hidden or 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
function testIKB(){ | |
var id='1vaRqCJNhLQs5BeaZWU652BbUsHNM_ksQhawu5KFJZSk'; | |
if (id!== undefined){ | |
var ss=SpreadsheetApp.openById(id); | |
} | |
else{ | |
var ss=ss||SpreadsheetApp.getActiveSpreadsheet(); | |
} | |
var signature=signature||'InlineKeyboard' |
This file contains hidden or 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
init by gas-hub, just delete this file. |
This file contains hidden or 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
// This function gets its input arguments from a spreadsheet cells | |
// It uses these arguments to create a RegExp using the | |
// RegExp constructor function. | |
/** | |
* @param {} searchString Строка в которой ищем совпадения с паттерном | |
* @param {} pattern Паттерн | |
* @param {} modifiers Флаги i,m,g | |
* @customfunction | |
*/ | |
function RegExpTest(searchString, pattern, modifiers) { |
This file contains hidden or 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
// | |
// AlaSQL node.js sample | |
// | |
//var data=[]; | |
//var data=fs.readFileSync('table.json'); | |
var filenamekub="csv/kub.csv"; | |
var filenameGrpD="csv/grpD.csv"; | |
//https://docs.google.com/spreadsheets/d/{key}/gviz/tq?tqx=out:csv&sheet={sheet_name} |
NewerOlder