Skip to content

Commit

Permalink
upgrade excelize package version
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjianzhang committed Sep 5, 2024
1 parent 90149af commit 6088db1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
32 changes: 16 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/bitly/go-simplejson v0.5.0
github.com/fsnotify/fsnotify v1.4.9
github.com/ghodss/yaml v1.0.0
github.com/gin-gonic/gin v1.9.1
github.com/gin-gonic/gin v1.10.0
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/google/uuid v1.3.0
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
Expand All @@ -19,10 +19,10 @@ require (
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/smartystreets/goconvey v1.6.4
github.com/spf13/cast v1.3.1
github.com/xuri/excelize/v2 v2.6.1
github.com/xuri/excelize/v2 v2.8.1
golang.org/x/crypto v0.23.0
google.golang.org/grpc v1.29.1
google.golang.org/protobuf v1.33.0
google.golang.org/protobuf v1.34.1
gorm.io/driver/mysql v1.5.0
gorm.io/gorm v1.25.1
gorm.io/plugin/dbresolver v1.3.0
Expand All @@ -31,43 +31,43 @@ require (
require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.3 // indirect
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 // indirect
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/image v0.10.0 // indirect
golang.org/x/net v0.21.0 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53 // indirect
github.com/xuri/nfp v0.0.0-20230919160717-d98342af3f05 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
Expand Down
9 changes: 6 additions & 3 deletions tools/utils/excel.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ var Cols = []string{"", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "

// WriteXlsx 填充excel
func WriteXlsx(sheet string, records interface{}) *excelize.File {
xlsx := excelize.NewFile() // new file
index := xlsx.NewSheet(sheet) // new sheet
xlsx.SetActiveSheet(index) // set active (default) sheet
xlsx := excelize.NewFile() // new file
index, err := xlsx.NewSheet(sheet) // new sheet
if err != nil {
return nil
}
xlsx.SetActiveSheet(index) // set active (default) sheet
t := reflect.TypeOf(records)

if t.Kind() != reflect.Slice {
Expand Down

0 comments on commit 6088db1

Please sign in to comment.