Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.dotnet.framework.aspnet,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Protecting a worksheet but still allowing Outlining/Grouping?

I am working on an ASP.NET application that generates an Excel 2003
spreadsheet on demand for the user, containing much sales information, and
then editable cells for the salerep user to enter forecasting information.
To make the spreadsheet easy to use, all cells are Protected except the
cells where the user will enter information.

However, since the information is presented in hierarchical layers, I need
to do grouping/outlining of the layers. That works great, until I Protect
the worksheet right before saving the generated workbook and allowing the
user to download it. When the user downloads it, the groupings show, but
when you try to collapse or expand the groupings, you get an error informing
you that the worksheet is protected instead of collapsing or expanding the
grouping.

I found the EnableOutlining property, but it is not saved with the
worksheet, so when the workbook is re-opened, the outlining is then again
locked.
(http://msdn.microsoft.com/library/de...HV05200924.asp)

So the other approach I tried is to put in a Worksheet_Open sub into the
worksheet that will automatically set EnableOutlining to True when opened.
However, I cannot figure out how to add the code in from ASP.NET, as Excel
2003 returns an error "Programmatic access to Visual Basic Project is not
trusted".

How do I go about allowing code to be added while creating a spreadsheet? I
know about going into Excel and checking the "Trust access to visual basic
project" setting, but that doesn't work when trying to generate the workbook
from a web app. I've seen some incomplete information about modifying the
local security policy to make this happen, but no good details on what I
need to allow.

Or preferably, is there some way to just set the ability to outline/group
information when creating the protected sheet?

Any information for either approach would be most appreciated! I'm beating
my head against the wall on this one! :)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
protecting formulas without protecting sheet so grouping still wor JM Excel Discussion (Misc queries) 1 June 4th 09 06:42 AM
Grouping and Outlining in Excel using sheet protection Rich Excel Discussion (Misc queries) 2 March 19th 09 07:28 PM
Grouping/Outlining in Excel 2003 with Protection turned on Rich Excel Discussion (Misc queries) 1 March 19th 09 03:20 PM
outlining / Grouping AFREP Excel Discussion (Misc queries) 1 August 17th 06 11:10 PM
protecting a sheet yet allowing for sorting, filtering, formatting [email protected] Excel Discussion (Misc queries) 0 June 28th 06 03:39 PM


All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"