Bug 56316 - No options to selectively lock/unlock components in a protected worksheet
Summary: No options to selectively lock/unlock components in a protected worksheet
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.11-dev
Hardware: PC All
: P2 enhancement with 5 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 00:10 UTC by noel.toms
Modified: 2017-09-28 08:51 UTC (History)
1 user (show)



Attachments
Screen shot showing the 'Use AutoFilter' feature while protecting sheet (56.41 KB, image/jpeg)
2014-03-26 04:43 UTC, noel.toms
Details

Note You need to log in before you can comment on or make changes to this bug.
Description noel.toms 2014-03-26 00:10:59 UTC
Hello,

I am trying to add an AutoFilter option to the header row of an excel sheet created using Apache POI API. The filters are appearing on the header rows, but unfortunately I am unable to filter the cell value by clicking on the filters. 
  I know that the excel sheet has an option to enable only the filter option when we try to protect the worksheet. Am looking for a similar functionality in Apache POI.
  Any help would be really appreciated

Thanks,
   Noel
Comment 1 Andreas Beeker 2014-03-26 00:17:46 UTC
Please attach a manually created excel file with the correct settings.
It's not clear, if you want a solution for the binary or xml based format.
Comment 2 noel.toms 2014-03-26 04:43:27 UTC
Created attachment 31439 [details]
Screen shot showing the 'Use AutoFilter' feature while protecting sheet
Comment 3 noel.toms 2014-03-26 04:46:27 UTC
Hi Andreas,

  I have ttached a manually created excel sheet which shows the 'Use AutoFilter' option while i try to protect the sheet. I am looking for exactly the same solution which i want to code in Java using Apache POI.

I want to protect the sheet and at the same time i need to enable the AutoFilter for the sheet after protecting it. Hope this helps.

Thanks,
   Noel
Comment 4 Dominik Stadler 2017-09-28 08:51:44 UTC
This should be possible in current versions of POI by calling XSSFSheet.lockAutoFilter(false)

There are also methods for the other protection types.