func OpenFile(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 2, 2, line) err := excel.OpenFile(cols[1]) if err != nil { fmt.Fprintf(os.Stderr, "file not found :"+line) os.Exit(2) } }
func AddSheet(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 2, 2, line) err := excel.AddSheet(cols[1]) if err != nil { fmt.Fprintf(os.Stderr, cols[1]+" can't add :"+line) os.Exit(2) } }
func CreateStyle(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 4, 6, line) cols = AddBlank(cols, 6) ptn := "" if cols[5] != "" { ptn = CheckBorderPattern(cols[5], line) } excel.CreateStyleByKey(cols[1], cols[2], Atoi(cols[3], line), cols[4], ptn) }
func SaveFile(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 2, 2, line) err := excel.Save(cols[1]) if err != nil { fmt.Fprintf(os.Stderr, "file write error :"+line) os.Exit(2) } }
func SetString(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 4, 4, line) excel.SetString(Atoi(cols[1], line), Atoi(cols[2], line), cols[3]) //fmt.Printf("SetString %v\n", cols[3]) }
func SetStyle(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 4, 4, line) excel.SetStyleByKey(Atoi(cols[1], line), Atoi(cols[2], line), cols[3]) }
func SetFontName(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 3, 3, line) excel.SetFontName(cols[1], cols[2]) }
func SetDateTime(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 4, 4, line) excel.SetDateTime(Atoi(cols[1], line), Atoi(cols[2], line), ParseDateTime(cols[3], line)) }
func SetFontColor(cols []string, line string, excel *ge.Goexcel) { defer PanicRecover(line) CheckColno(cols, 3, 3, line) excel.SetFontColor(cols[1], SetColorSub(cols[2], line)) }
func SetFontSize(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 3, 3, line) excel.SetFontSize(cols[1], Atoi(cols[2], line)) }
func SetDateTimeFormat(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 5, 5, line) excel.SetDateFormat(Atoi(cols[1], line), Atoi(cols[2], line), ParseDateTime(cols[3], line), cols[4]) }
func Merge(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 5, 5, line) excel.Merge(Atoi(cols[1], line), Atoi(cols[2], line), Atoi(cols[3], line), Atoi(cols[4], line)) }
func SetFill(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 5, 5, line) defer PanicRecover(line) excel.SetFill(cols[1], CheckFillPattern(cols[2], line), SetColorSub(cols[3], line), SetColorSub(cols[4], line)) }
func SetFormulaFormat(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 5, 5, line) excel.SetFormulaFormat(Atoi(cols[1], line), Atoi(cols[2], line), cols[3], cols[4]) }
func SetHorizontalAlign(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 3, 3, line) excel.SetHorizontalAlign(cols[1], CheckHAline(cols[2], line)) }
func SetVerticalAlign(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 3, 3, line) excel.SetVerticalAlign(cols[1], CheckVAline(cols[2], line)) }
func SetColWidth(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 4, 4, line) excel.SetColWidth(Atoi(cols[1], line), Atoi(cols[2], line), ParseFloat(cols[3], line)) }
func CopyStyle(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 3, 3, line) excel.CopyStyle(cols[1], cols[2]) }
func SetBorderColor(cols []string, line string, excel *ge.Goexcel) { defer PanicRecover(line) CheckColno(cols, 4, 4, line) excel.SetBorderColor(cols[1], cols[2], SetColorSub(cols[3], line)) }
func SetBorder(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 4, 4, line) ptn := CheckBorderPattern(cols[3], line) excel.SetBorder(cols[1], cols[2], ptn) }
func SetFormula(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 4, 4, line) excel.SetFormula(Atoi(cols[1], line), Atoi(cols[2], line), cols[3]) }
func SetItalic(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 3, 3, line) excel.SetItalic(cols[1], AtoBool(cols[2], line)) }
func SetNumberFormat(cols []string, line string, excel *ge.Goexcel) { CheckColno(cols, 5, 5, line) excel.SetFloatFormat(Atoi(cols[1], line), Atoi(cols[2], line), ParseFloat(cols[3], line), cols[4]) }