question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with protect sheet and sorting

See original GitHub issue

Hi,

I am using XlsxWriter to do protect sheet with sorting and autofliter options available, but it appears sorting is not working.

I am using Python version 3.5.2 and XlsxWriter 1.0.3.


import xlsxwriter
import uuid

workbook = xlsxwriter.Workbook('test.xlsx')
worksheet = workbook.add_worksheet()

for x in range(0,5):
	worksheet.write(0, x, 'Header_' + str(x))

for y in range(1,5):
	for x in range(0,5):
		worksheet.write(y, x, str(uuid.uuid4()))
	
worksheet.autofilter(0, 0, 4, 4)
worksheet.protect('pwd', {'sort': 1,'autofilter': 1,})

workbook.close()

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jmcnamaracommented, May 31, 2020

Re-opening since this feature seems to have some interest.

0reactions
jmcnamaracommented, Sep 24, 2020

Thanks everyone for the input.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Protected sheet doesn't allow sorting or filtering
I have a spreadsheet that has column and rows added/deleted quite often. I have it protected so our staff can't change anything but...
Read more >
How to allow sorting and Filter locked cells in protected sheets?
1. Select a range you will allow users to sorting and filtering, click Data > Filter to add the Filtering icons to the...
Read more >
How to Sort Locked Cells in Protected Worksheets - SoftArtisans
Click “Protect Sheet…” Give the worksheet a password; Uncheck the worksheet protection property called “Select Locked Cells”; Check the “Sort” ...
Read more >
Sorting Data on Protected Worksheets - Excel Ribbon Tips
Before locking the worksheet, select all the cells that you want people to be able to sort. (A great way to do this...
Read more >
Password protect but allow Filter & Pivot use and Sorting
00:00 Protect sheets switches off filter and Pivot Table options ; 00:29 Change the protection options so that you can use the filter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found