excelutil

package module
v0.0.0-...-1dfec2a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2019 License: MIT Imports: 4 Imported by: 0

README

Excel Utilities - Documentation


Author: Daniel Schuette

E-Mail: d.schuette@online

Please write me an email if you have any issues/questions/problems related to this piece of software. Read this documentation first, though!


A utility package to open and manipulate Microsoft Excel files using a simple CLI.

Dependencies

github.com/360EntSecGroup-Skylar/excelize

License

MIT

Documentation

Overview

Package excelutil provides ... TODO: write a helpful docs file

Package excelutil is a command line program that converts an excel workbook with potentially multiple spread sheets of a given format to another format while doing the appropriate maths. It can create graphs and sort the columns of the primary output according to the maximum value per output. author: Daniel Schuette (email: d.schuette@online.de) license: MIT license (see github.com/DanielSchuette)

Index

Constants

View Source
const (
	ENUM  = 1 // enumerator = 340
	DENOM = 2 // denominator = 380
	SKIP  = 3 // we don't want this field

)

define constants

Variables

This section is empty.

Functions

func FindMaxElem

func FindMaxElem(input map[int]float64) int

FindMaxElem is a helper function for iterating over a map; it finds the max value ==> gets its index ==> returns the index of the max value

func GetColumn

func GetColumn(num int) string

takes an integer and returns an Excel-style string representation of it (e.g. 1 = A, 3 = C, 27 = AA, ...) the current implementation only works for a limited amount of cells, though

func PrintDelim

func PrintDelim()

prints a useful delimiter

Types

type ExcelWorkbook

type ExcelWorkbook struct {
	XLSX       *excelize.File
	SheetNames []string
	NumSheets  int
	Dims       [2]int
}

ExcelWorkbook holds all important workbook-related information

func (*ExcelWorkbook) Dimensions

func (wb *ExcelWorkbook) Dimensions(sheet string) [2]int

Dimensions returns the dimensions of a sheet in the format (rows, cols)

func (*ExcelWorkbook) GetSheetNames

func (wb *ExcelWorkbook) GetSheetNames()

GetSheetNames gets all sheet names from a given workbook and stores them in the ExcelWorkbook struct

func (*ExcelWorkbook) NumberOfSheets

func (wb *ExcelWorkbook) NumberOfSheets() int

NumberOfSheets returns the number of sheets in an excelWorkbook

func (*ExcelWorkbook) Open

func (wb *ExcelWorkbook) Open(name string)

Open opens a .xlsx file and assigns it to an ExcelWorkbook

func (*ExcelWorkbook) StartRow

func (wb *ExcelWorkbook) StartRow(sheet, label string) (int, error)

StartRow returns the row index at which the actual data matrix starts as an integer

Directories

Path Synopsis
Package excelutil is a command line program that converts an excel workbook with potentially multiple spread sheets of a given format to another format while doing the appropriate maths.
Package excelutil is a command line program that converts an excel workbook with potentially multiple spread sheets of a given format to another format while doing the appropriate maths.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL