diff --git a/excelize.go b/excelize.go index 315f41bf5b..a90b765115 100644 --- a/excelize.go +++ b/excelize.go @@ -70,6 +70,8 @@ type Options struct { // return // } // +// Note that the excelize just support decrypt and not support encrypt currently, the spreadsheet +// saved by Save and SaveAs will be without password unprotected. func OpenFile(filename string, opt ...Options) (*File, error) { file, err := os.Open(filename) if err != nil { diff --git a/file.go b/file.go index a35bc4d89e..83ed2711ff 100644 --- a/file.go +++ b/file.go @@ -73,6 +73,7 @@ func (f *File) SaveAs(name string, opt ...Options) error { return err } defer file.Close() + f.options = nil for _, o := range opt { f.options = &o } diff --git a/go.mod b/go.mod index 9b013566e4..fb2c1e8b99 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/stretchr/testify v1.6.1 github.com/xuri/efp v0.0.0-20200605144744-ba689101faaf golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a - golang.org/x/image v0.0.0-20200801110659-972c09e46d76 - golang.org/x/net v0.0.0-20200822124328-c89045814202 + golang.org/x/image v0.0.0-20200922025426-e59bae62ef32 + golang.org/x/net v0.0.0-20200904194848-62affa334b73 golang.org/x/text v0.3.3 ) diff --git a/go.sum b/go.sum index bc606dfebf..e082e86359 100644 --- a/go.sum +++ b/go.sum @@ -17,11 +17,11 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/image v0.0.0-20200801110659-972c09e46d76 h1:U7GPaoQyQmX+CBRWXKrvRzWTbd+slqeSh8uARsIyhAw= -golang.org/x/image v0.0.0-20200801110659-972c09e46d76/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200922025426-e59bae62ef32 h1:E+SEVulmY8U4+i6vSB88YSc2OKAFfvbHPU/uDTdQu7M= +golang.org/x/image v0.0.0-20200922025426-e59bae62ef32/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73 h1:MXfv8rhZWmFeqX3GNZRsd6vOLoaCHjYEX3qkRo3YBUA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=