Hi,
If I protect the pivot sheet.I am unable to get the pivot Data in my Excel pivot sheet.
Please tell me how to get this done.
Below is the code I used to protect my sheets
public Workbook protectworkbook(writeWorkbook){
for(int i=0; i<writeWorkbook.getWorksheets().getCount(); i++)
{
Worksheet sheet = (Worksheet)writeWorkbook.getWorksheets().get(i);
sheet.getProtection().setAllowEditingContent(false);
sheet.getProtection().setUsingPivotTablesAllowed(true);
// sheet.protect(ProtectionType.ALL); //tested by removing this line and keeping this line
}
return writeWorkbook;
}
After getting downloaded the Excel file,
I opened it. Then Its giving error Messge Like
"The command cannot be performed while a protected sheet sheet contains another pivottable report based on the same source data".
And its saying to remove protection for pivot sheet.
Please help.