Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unprotected Cell #273

Closed
akbarsetiadi opened this issue Sep 28, 2018 · 5 comments
Closed

Unprotected Cell #273

akbarsetiadi opened this issue Sep 28, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@akbarsetiadi
Copy link

akbarsetiadi commented Sep 28, 2018

Hello!
I just tested to protect cell like this

xlsx.SetCellValue("Sheet1", "B5", "Hello world.")`

style, err := xlsx.NewStyle(`{"protection":{"locked":true}}`)
if err != nil {
    fmt.Println(err)
}
xlsx.SetCellStyle("Sheet1", "B5", "B5", style)

But why does that cell is unprotected?
Thank you
test.xlsx

@akbarsetiadi
Copy link
Author

akbarsetiadi commented Nov 1, 2018

Hello, any updates for this issue? @xuri thankyou

@xuri
Copy link
Member

xuri commented Nov 1, 2018

Hi @akbarstd, thanks for your issue. I have tested with attachment and it works well. The cell Sheet1!B5 already locked, We can validate that by right-click on Sheet1!B5, select Format Cells, and click on the Protection tab. "Locked" checkbox has been already checked. The cell style of Sheet1!B5 will not be changed if users to adjust other cells in a worksheet. Reference issue #191.

@akbarsetiadi
Copy link
Author

Hello @xuri, I have looked Format Cells in Microsoft Word and "Locked" checkbox has been checked. I am sorry because even though the cell is locked, I still can change the data

@akbarsetiadi
Copy link
Author

I am sorry after I read the documentation, I cant found how to protect sheet. It is possible to do that with your library? @xuri thank you

@xuri
Copy link
Member

xuri commented Nov 2, 2018

I have added this feature request to the Roadmap.

@xuri xuri added the enhancement New feature or request label Nov 2, 2018
HcySunYang added a commit to HcySunYang/excelize that referenced this issue Nov 2, 2018
@xuri xuri closed this as completed in 4dbc78c Nov 2, 2018
nullfy pushed a commit to nullfy/excelize that referenced this issue Oct 23, 2020
new feature: protect sheet support, relate issue qax-os#273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants