Skip to content

Latest commit

 

History

History
87 lines (76 loc) · 5.14 KB

README.developer.md

File metadata and controls

87 lines (76 loc) · 5.14 KB

En

Excel functions (alphabetical)

(function () {
 var result = "{\n \"functions\": [\n",
     tableId = "tblID0EBDAAA",
     tbody = $('#' + tableId).children('tbody');
 $(tbody).find('tr').each(function (index) {
    var functionNameCol = $(this).find("td:eq(0)"),
        functionNameParagraph = $(functionNameCol).find("p:eq(0)"),
        functionNameLink = $(functionNameParagraph).find("a:eq(0)"),
        functionName = functionNameLink.text(),
        functionLink = functionNameLink.attr('href'),
        functionIntro = $(functionNameParagraph).find("img:eq(0)").attr('title'),
        typeAndDescriptionCol = $(this).find("td:eq(1)"),
        description = $(typeAndDescriptionCol).find("p:eq(0)").clone().children().remove().end().text().replace(/[\n\r]/g, ' '),
        category = $(typeAndDescriptionCol).find("b:eq(0)").text().replace(/[\n\r]/g, ' '),
        categoryLastChar = category.trim().substr(category.length - 1);
        item = "  {\n   \"name\": " 
         + (functionName.endsWith(" function") ? "\"" + functionName.slice(0, -9) + "\"" :
            (functionName.endsWith(" functions") ? "[\"" + functionName.slice(0, -10).split(", ").join("\", \"") + "\"]" : "\"" + functionName + "\""))
         + ",\n   \"url\": \"https://support.office.com/en-us/article/" 
         + functionLink + "\",\n"
         + "   \"category\": \"" + (categoryLastChar === ':' ? category.slice(0, -1) : category) + "\",\n"
         + "   \"description\": \"" + description.trim() + "\",\n"
         + "   \"intro\": \"" + (typeof functionIntro === "undefined" ? "" : 
                             (functionIntro.startsWith("Excel ") ? functionIntro.slice(6, functionIntro.length) : functionIntro)) + "\"\n"
         + "  },\n";
    result += item;
 });
 console.log(result + " ]\n}\n");
}());

excel-functions-alphabetical.json

Excel functions (by category)

Ru

Функции Excel

(function () {
 var result = "{\n \"functions\": [\n",
     tableId = "tblID0EBDAAA",
     tbody = $('#' + tableId).children('tbody');
 $(tbody).find('tr').each(function (index) {
    var functionNameCol = $(this).find("td:eq(0)"),
        functionNameParagraph = $(functionNameCol).find("p:eq(0)"),
        functionNameLink = $(functionNameParagraph).find("a:eq(0)"),
        functionName = functionNameLink.text(),
        functionLink = functionNameLink.attr('href'),
        functionIntro = $(functionNameParagraph).find("img:eq(0)").attr('title'),
        typeAndDescriptionCol = $(this).find("td:eq(1)"),
        description = $(typeAndDescriptionCol).find("p:eq(0)").clone().children().remove().end().text().replace(/[\n\r]/g, ' '),
        category = $(typeAndDescriptionCol).find("b:eq(0)").text().replace(/[\n\r]/g, ' '),
        categoryLastChar = category.trim().substr(category.length - 1);
        item = "  {\n   \"name\": " 
         + (functionName.startsWith("Функция ") ? "\"" + functionName.slice(8, functionName.length) + "\"" :
            (functionName.startsWith("Функции") ? "[\"" + functionName.slice(8, functionName.length).split(", ").join("\", \"") + "\"]" : "\"" + functionName + "\""))
         + ",\n   \"url\": \"https://support.office.com/ru-ru/article/" 
         + functionLink + "\",\n"
         + "   \"category\": \"" + (categoryLastChar === ':' ? category.slice(0, -1) : category) + "\",\n"
         + "   \"description\": \"" + description.trim() + "\",\n"
         + "   \"intro\": \"" + (typeof functionIntro === "undefined" ? "" : 
                             (functionIntro.startsWith("Excel ") ? functionIntro.slice(6, functionIntro.length) : functionIntro)) + "\"\n"
         + "  },\n";
    result += item;
 });
 console.log(result + " ]\n}\n");
}());

функции-excel.json

Функции Excel (по категориям)

Ссылки