Formulário de Inventário de Estoque no Google Planilhas | Google Apps Script | COMPLETO

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024

Комментарии • 3

  • @sgpgooglesheets
    @sgpgooglesheets  3 месяца назад

    Script Classificar para copiar:
    function sortTable(table, col, reverse) {

    if(col == 0 || col == 2 || col == 3 || col == 4){
    return false;
    }
    var tb = table.tBodies[0],
    tr = Array.prototype.slice.call(tb.rows, 0), i;
    reverse = -((+reverse) || -1);
    tr = tr.sort(function(a, b) {
    return reverse * (a.cells[col].textContent.trim()
    .localeCompare(b.cells[col].textContent.trim()));
    });
    for (i = 0; i < tr.length; ++i) tb.appendChild(tr[i]);

    }
    function makeSortable(table) {
    var th = table.tHead, i;
    th && (th = th.rows[0]) && (th = th.cells);
    if (th) i = th.length;
    else return;
    while (--i >= 0)(function(i) {
    var dir = 1;
    th[i].addEventListener('click', function() {
    sortTable(table, i, (dir = 1 - dir))
    });
    }(i));

    }
    function makeAllSortable(parent) {

    parent = parent || document.body;
    var t = parent.getElementsByTagName('table'), i = t.length;
    while (--i >= 0) makeSortable(t[i]);
    }
    window.onload = function(){
    makeAllSortable();
    }
    ✅Site SGP: Venda de Coleção de Planilhas Google Prontas: planilhascanalsgp.com.br/planilhasgoogle
    ==============================
    🟢Comprar via WhatsApp: (49)98915-4923 - Planilha pronta

  • @MatheusSilva-qm3ph
    @MatheusSilva-qm3ph 3 месяца назад +1

    Muito bom!