<commit_before><commit_msg>Add XLSX support<commit_after>package main

import (
	"github.com/tealeg/xlsx"

	"fmt"
)

type XlsxEncoder struct {
	file  *xlsx.File
	sheet *xlsx.Sheet
}

func NewXlsxEncoder() *XlsxEncoder {

	file := xlsx.NewFile()
	sheet, _ := file.AddSheet("data")

	return &XlsxEncoder{file, sheet}
}

func (e *XlsxEncoder) Encode(values map[string]interface{}) error {
	row := e.sheet.AddRow()

	for _, value := range values {
		cell := row.AddCell()
		switch value := (value).(type) {
		case []byte:
			cell.Value = string(value)
		case int64:
			cell.Value = fmt.Sprintf("%d", value)
		}
	}
	return nil
}
{'fraction_non_alphanumeric': 0.15409309791332262, 'fraction_numerical': 0.0032102728731942215, 'mean_word_length': 4.032258064516129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4052316', 'n_tokens_mistral': 258, 'n_tokens_neox': 243, 'n_words': 52}