excels

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package excels Package internal Time : 2022/9/3 15:26 Author : xushiyin contact : yuqingxushiyin@gmail.com

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDaysReports added in v0.2.3

func GetDaysReports(startDate string, rangeCnt int, onlyContent bool, logger *log.Entry) (string, error)

Types

type DailyReport

type DailyReport struct {
	DateStr     string
	ReportStr   string
	CategoryStr string
	CompleteStr string
	ProgressStr string
	Remarks     string
}

type Excels

type Excels struct {
	FilePath     string
	Sheet        string
	FilePassword string
	File         *excelize.File
	Logger       *log.Entry
}

func NewExcels

func NewExcels(filePath, filePassword, sheet string, logger *log.Entry) *Excels

func (*Excels) FindDateCell

func (e *Excels) FindDateCell(date string) ([]string, error)

func (*Excels) FindValidRowNumber

func (e *Excels) FindValidRowNumber() int

FindValidRowNumber return the number of valid rows in the sheet

func (*Excels) GetOneDayDailyReport

func (e *Excels) GetOneDayDailyReport(month string, date string) ([][]string, error)

func (*Excels) GetRowAxis

func (e *Excels) GetRowAxis(axis string, line int) ([]string, error)

func (*Excels) GetRowData

func (e *Excels) GetRowData(axis []string) ([]string, error)

func (*Excels) GetSheetMonth

func (e *Excels) GetSheetMonth() []string

func (*Excels) IsExcelExists

func (e *Excels) IsExcelExists() (bool, error)

func (*Excels) LogErr added in v0.2.0

func (e *Excels) LogErr(err error, message string, args ...interface{}) error

func (*Excels) MergeDateCell

func (e *Excels) MergeDateCell(date string) error

func (*Excels) OpenFile

func (e *Excels) OpenFile() error

func (*Excels) ReadOneDayDailyReportFromExcel

func (e *Excels) ReadOneDayDailyReportFromExcel(dateFlag string, rangeFlag int, stdOutFlag, onlyContent bool) (string, error)

func (*Excels) RenderData added in v0.2.0

func (e *Excels) RenderData(ds [][][]string, stdOutFlag, onlyContent bool) (string, error)

func (*Excels) WriteDailyReport

func (e *Excels) WriteDailyReport(rowNum int, dr *DailyReport) error

WriteDailyReport writes the daily report to the valid row of Excel file

func (*Excels) WriteDailyReport2Excel

func (e *Excels) WriteDailyReport2Excel(dr *DailyReport) error

Jump to

Keyboard shortcuts

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