本文整理匯總了Golang中github.com/mikeshimura/goexcel.Goexcel類的典型用法代碼示例。如果您正苦於以下問題:Golang Goexcel類的具體用法?Golang Goexcel怎麽用?Golang Goexcel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Goexcel類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: OpenFile
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)
}
}
示例2: AddSheet
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)
}
}
示例3: CreateStyle
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)
}
示例4: SaveFile
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)
}
}
示例5: SetString
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])
}
示例6: SetStyle
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])
}
示例7: SetFontName
func SetFontName(cols []string, line string, excel *ge.Goexcel) {
CheckColno(cols, 3, 3, line)
excel.SetFontName(cols[1], cols[2])
}
示例8: SetDateTime
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))
}
示例9: SetFontColor
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))
}
示例10: SetFontSize
func SetFontSize(cols []string, line string, excel *ge.Goexcel) {
CheckColno(cols, 3, 3, line)
excel.SetFontSize(cols[1], Atoi(cols[2], line))
}
示例11: SetDateTimeFormat
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])
}
示例12: Merge
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))
}
示例13: SetFill
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))
}
示例14: SetFormulaFormat
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])
}
示例15: SetHorizontalAlign
func SetHorizontalAlign(cols []string, line string, excel *ge.Goexcel) {
CheckColno(cols, 3, 3, line)
excel.SetHorizontalAlign(cols[1], CheckHAline(cols[2], line))
}