/**
* @param {globalThis.SpreadsheetApp.Range} range
*/
function cell_Link_Activate_(range) {
const values = range.getValues();
const rtvsOld = range.getRichTextValues();
const rtvs = values.map((row, x) => row.map((cell, y) => {
if (cell !== '') {
const rtv = SpreadsheetApp.newRichTextValue()
.setText(cell)
.setLinkUrl(cell)
.build();
return rtv;
}
return rtvsOld[x][y];
}));
range.setRichTextValues(rtvs);
}
body.replaceText("{Фамилия Имя Отчество}", "");
body.replaceText("{Космодемьянская д. 13 кв. 29}", "");
body.replaceText("{1111 111111}", "");
body.replaceText("{почта}", "");
body.replaceText("{01.01.2000}", "");
body.replaceText("{Фамилия Имя Отчество}", "");
body.replaceText("{Космодемьянская д. 13 кв. 29}", "");
body.replaceText("{2222 333333}", "");
body.replaceText("{мясо}", "");
body.replaceText("{01.01.2222}", "");
body.replaceText("{ДР33.33.3333}", "");
body.replaceText("{сок}", "");
body.replaceText("{хлеб}", "");
body.replaceText("{номер телефона}", "");
body.replaceText("{адрес}", "");
body.replaceText("{1 телефон}", "");
body.replaceText("{2.Фамилия Имя Отчество}", "");
body.replaceText("{2 телефон}", "");
body.replaceText('{.*?}', '');
=IMPORTDATA("https://script.google.com/macros/s/AKfycbzMBdr9yLrFPTOiRdEAr-2tHp4vkTasa6t8ME9_yxFDwCqQqg-JZEOQDHTvfrde7ahM/exec?fileId=" & C3)
C3
- ID Документа
const uri = [[B_TITLE]]; const encoded = encodeURIComponent(uri); [[ENCODED]] = encoded;
В перем [[B_TITLE]] находится как пример: Отправка данных в Google Docs GET запросами
На выходе имеем в [[ENCODED]] такое уже сконверченное: %D0%9E%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%BA%D0%B0%20%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85%20%D0%B2%20Google%20Docs%20GET%20%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0%D0%BC%D0%B8