excel

package
v0.0.0-...-72aa20e Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertCSV

func ConvertCSV(path string, verbose bool) *excelize.File

ConvertCSV converts a csv file to an excel file

func Departments

func Departments() []string

Departments returns a list of all avaiable departments

func FilterColumns

func FilterColumns(cols []int, read *pe.Read) map[int][]interface{}

FilterColumns extracts cols and returns a map with values per col

func Open

func Open(path string) *pe.Read

Open opens the excel file at path for read only access

Types

type Department

type Department string

Department describes the departments employees are categorised in

const (
	// ManagingDirectors Department
	ManagingDirectors Department = "Geschäftsführung"
	// Consulting Department
	Consulting Department = "Beratung"
	//Creation Department
	Creation Department = "Kreative"
	//Production Department
	Production Department = "Produktion"
	//Text Department
	Text Department = "Text"
	//Administration Department
	Administration Department = "Verwaltung"
	//Training Department
	Training Department = "Auszubildende/Trainee"
	//PR Department
	PR Department = "PR"
)

type TimetrackingFile

type TimetrackingFile struct {
	// contains filtered or unexported fields
}

TimetrackingFile wraps the time tracking excel file from proad in a struct

func ReadProadExcel

func ReadProadExcel(path string) *TimetrackingFile

ReadProadExcel opens a proad export, that has been saved as excel

func (*TimetrackingFile) GetColumns

func (ttf *TimetrackingFile) GetColumns(columns []int) map[int][]string

GetColumns returns a map with columns as key and cellValues as value array

type WorkloadFile

type WorkloadFile struct {
	// contains filtered or unexported fields
}

WorkloadFile represents a workload file

func OpenWorkloadFile

func OpenWorkloadFile(path string) *WorkloadFile

OpenWorkloadFile opens and returns a workloadfile

func (*WorkloadFile) AddEmployee

func (wf *WorkloadFile) AddEmployee(name string, department Department)

AddEmployee adds a new Employee alphabetically and in the provided department

func (*WorkloadFile) AddValueToEmployee

func (wf *WorkloadFile) AddValueToEmployee(employee string, value float64, sheetname, column string)

AddValueToEmployee adds a value to employee in the last used column of sheet

func (*WorkloadFile) DeclareNewColumnForPeriod

func (wf *WorkloadFile) DeclareNewColumnForPeriod(period string, sheetname string) string

DeclareNewColumnForPeriod adds a new period into the next free column of sheetname

func (*WorkloadFile) DeclareNewColumnWithNextPeriod

func (wf *WorkloadFile) DeclareNewColumnWithNextPeriod(sheetname string) string

DeclareNewColumnWithNextPeriod adds a new column to sheetname with a week more based on the last week

func (*WorkloadFile) ModifiableSheetnames

func (wf *WorkloadFile) ModifiableSheetnames() []string

ModifiableSheetnames returns all sheetnames, that need to be modified

func (*WorkloadFile) RemoveLastPeriod

func (wf *WorkloadFile) RemoveLastPeriod(sheetname string, rowExeptions []int)

RemoveLastPeriod removes the values of the most recent added column

func (*WorkloadFile) Save

func (wf *WorkloadFile) Save(path string)

Save saves the workloadfile to path

func (*WorkloadFile) Sheetnames

func (wf *WorkloadFile) Sheetnames() []string

Sheetnames returns all sheetnames of the workloadfile

func (*WorkloadFile) UpdateFormulas

func (wf *WorkloadFile) UpdateFormulas(sheetname string, belowRow int) map[string]string

UpdateFormulas corrects formulas, that became incorrect by inserting a row

Jump to

Keyboard shortcuts

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