-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
confirmedThis issue can be reproducedThis issue can be reproduced
Description
Description
I want to revent a sheet from being modified.
Steps to reproduce the issue:
- open protect worksheet
- select
Set column format
Set row format
Select locked cells
Select unlocked cells
- Want to
can modify Modify cell width,but can not modify cell value
- I fork the this lib. the add API GetProtectSheet, read the FormatSheetProtection, then set the save field which is true. but it not works.
Describe the results you received:
protect all, I can not modify modify cell width
Describe the results you expected:
can modify Modify cell width,but can not modify cell value
Output of go version
:
go version go1.12.6 darwin/amd64
Excelize version or commit ID:
9279c86d85ab0077f3696b8ec4cfb49ad8222530
Environment details (OS, Microsoft Excel™ version, physical, etc.):
mac:
Darwin localhost 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
excel:
v16.16.12(190715)
func (f *File) GetProtect(sheet string) (*FormatSheetProtection, error) {
xlsx, err := f.workSheetReader(sheet)
if err != nil {
return nil, err
}
var ret FormatSheetProtection
ret.AutoFilter = xlsx.SheetProtection.AutoFilter
ret.DeleteColumns = xlsx.SheetProtection.DeleteColumns
ret.DeleteRows = xlsx.SheetProtection.DeleteRows
ret.FormatCells = xlsx.SheetProtection.FormatCells
ret.FormatColumns = xlsx.SheetProtection.FormatColumns
ret.FormatRows = xlsx.SheetProtection.FormatRows
ret.InsertColumns = xlsx.SheetProtection.InsertColumns
ret.InsertHyperlinks = xlsx.SheetProtection.InsertHyperlinks
ret.InsertRows = xlsx.SheetProtection.InsertRows
ret.EditObjects = xlsx.SheetProtection.Objects
ret.PivotTables = xlsx.SheetProtection.PivotTables
ret.EditScenarios = xlsx.SheetProtection.Scenarios
ret.SelectLockedCells = xlsx.SheetProtection.SelectLockedCells
ret.SelectUnlockedCells = xlsx.SheetProtection.SelectUnlockedCells
ret.Sort = xlsx.SheetProtection.Sort
return &ret, err
}
Metadata
Metadata
Assignees
Labels
confirmedThis issue can be reproducedThis issue can be reproduced
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Bugfix qax-os#454
Merge pull request #459 from WuXu1995/master
xuri commentedon Aug 7, 2019
Hi @exfly, this issue has been fixed. Please try to upgrade the library with the master branch code.
Bugfix qax-os#454
Merge pull request qax-os#459 from WuXu1995/master