File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ type Options struct {
7070// return
7171// }
7272//
73+ // Note that the excelize just support decrypt and not support encrypt currently, the spreadsheet
74+ // saved by Save and SaveAs will be without password unprotected.
7375func OpenFile (filename string , opt ... Options ) (* File , error ) {
7476 file , err := os .Open (filename )
7577 if err != nil {
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ func (f *File) SaveAs(name string, opt ...Options) error {
7373 return err
7474 }
7575 defer file .Close ()
76+ f .options = nil
7677 for _ , o := range opt {
7778 f .options = & o
7879 }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ require (
88 github.com/stretchr/testify v1.6.1
99 github.com/xuri/efp v0.0.0-20200605144744-ba689101faaf
1010 golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
11- golang.org/x/image v0.0.0-20200801110659-972c09e46d76
12- golang.org/x/net v0.0.0-20200822124328-c89045814202
11+ golang.org/x/image v0.0.0-20200922025426-e59bae62ef32
12+ golang.org/x/net v0.0.0-20200904194848-62affa334b73
1313 golang.org/x/text v0.3.3
1414)
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
1717golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 /go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto =
1818golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM =
1919golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a /go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto =
20- golang.org/x/image v0.0.0-20200801110659-972c09e46d76 h1:U7GPaoQyQmX+CBRWXKrvRzWTbd+slqeSh8uARsIyhAw =
21- golang.org/x/image v0.0.0-20200801110659-972c09e46d76 /go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0 =
20+ golang.org/x/image v0.0.0-20200922025426-e59bae62ef32 h1:E+SEVulmY8U4+i6vSB88YSc2OKAFfvbHPU/uDTdQu7M =
21+ golang.org/x/image v0.0.0-20200922025426-e59bae62ef32 /go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0 =
2222golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 /go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg =
23- golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA =
24- golang.org/x/net v0.0.0-20200822124328-c89045814202 /go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA =
23+ golang.org/x/net v0.0.0-20200904194848-62affa334b73 h1:MXfv8rhZWmFeqX3GNZRsd6vOLoaCHjYEX3qkRo3YBUA =
24+ golang.org/x/net v0.0.0-20200904194848-62affa334b73 /go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA =
2525golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a /go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY =
2626golang.org/x/sys v0.0.0-20190412213103-97732733099d /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
2727golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
You can’t perform that action at this time.
0 commit comments