<commit_before>/**
* Creating a excel file
*
* @author <NAME>
*/
use("exceloutput.js");

print("Creating a excelfile");

var spreadsheet = new ExcelOutput("testsheet");

spreadsheet.addRow(0);
spreadsheet.createCell("Sum: ", 0);
spreadsheet.createCell("Result: ", 1);

var rownum = 1;
for(i = 0; i < 10; i++){
    spreadsheet.addRow(rownum);
    rownum++;
    var a = 1;
    var b = 2;

    spreadsheet.createCell(a +" + "+ b +"=", 0);
    spreadsheet.createCell(a + b, 1);
}

spreadsheet.save("workbook.xlsx");<commit_msg>Create excel file<commit_after>/**
* Creating a excel file using data from the crawler
*
* @author <NAME>
*/
use("Crawler");
use("ExcelExport");

var doc = Crawler.crawl("http://mawoo.nl");
var element = doc.select(".service-box-1 p");

var sheet = ExcelExport.create("mawoo-content");
var rowCount = 0;

element.forEach(function(element) {
    sheet.addRow(rowCount).createCell(element.text(), 0);
    debug(element.text()) ;
    rowCount++;
    
    sheet.save("mawoo-data.xlsx");
});
{'fraction_non_alphanumeric': 0.19028741328047571, 'fraction_numerical': 0.013875123885034688, 'mean_word_length': 4.287958115183246, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6394530', 'n_tokens_mistral': 389, 'n_tokens_neox': 361, 'n_words': 77}