For a Web Excel layout:
I've placed the following Javascript into a text element after the layout call in the WIB.
<script language="JavaScript" type="text/javascript">
<!--
var layout_id = "Layout_Margperc";
layout_sheet = getBpsExcel( layout_id );
if (layout_sheet && layout_sheet.ActiveSheet) {
// OPEN Excel OWC FOR CHANGE
layout_sheet.ActiveSheet.Protection.Enabled = false;
// Allow sorting
layout_sheet.ActiveSheet.Protection.AllowSorting = true ;
// Disallow Filtering
layout_sheet.ActiveSheet.Protection.AllowFiltering = false ;
//PROTECT THE SHEET AGAIN
layout_sheet.ActiveSheet.Protection.Enabled = true;
}
-->
</script>
It seems plain enough, but what I want to do is have the sort WITHOUT the filtering. If I leave the sheet protected, the <u>Sort</u> is enabled and <u>filtering</u> is not but I get the error notice:
"<i>The range you are trying to modify is locked and therefore read-only"</i>
and the sort fails.
If I leave the sheet unprotected to perform the sort, the filtering button is enabled, even though I've set the property to false.
Does anyone see a work around to disable the filtering even though the sheet is unprotected. ?
Thanks
Brent