473,503 Members | 12,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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! :)
Nov 19 '05 #1
0 1312

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2176
by: Roland Hall | last post by:
I read Aaron's article: http://www.aspfaq.com/show.asp?id=2276 re: protecting images from linked to by other sites. There is a link at the bottom of that page that references an interesting...
1
1311
by: M.C. Radhakrishnan | last post by:
Hi, I need to provide a facility to do routine database administration (backups, etc.) without allowing the logged in user to modify the data in any of the SQL server tables. Is there any way...
6
1747
by: Nate A | last post by:
I am at the beginning stages of writing a massive database-connected business management application using the .NET framework and am becoming worried about the security of the application upon...
9
13812
by: John Brock | last post by:
I am trying to create a workbook where one of the worksheets contains an AutoFiltered table. It looks like it should be simple -- what I am doing is this: rng = ws.Range("MyTableRange")...
3
1497
by: KK | last post by:
Dear All Recently I started using VisualStudio2005 for my C++ development.Earlier I was using 2003. I found difference between these two version in showing the code outlining. For example : ...
1
2784
by: madeleine.macphail | last post by:
All I'm currently attempting to move us from a spreadsheet based system to a database system. The first phase is to import the data on a regular basis from the spreadsheets to get the database...
12
1898
by: Dr. Edmund M. Hayes | last post by:
I wrote a access program that works well enough that a handful of people would like to buy it from me. My problem is that if I sell it to someone there is no mechanism that I know of to protect...
3
10528
by: sun919 via DotNetMonster.com | last post by:
hi , i have a question to ask regarding deleting the worksheet basically i have written code which find the select worksheet which work fine but it didn't delete the worksheet from the workbook...
1
1751
by: Chris | last post by:
I'm sitting with a bit of an issue with pyExcelerator and creating an Excel file with certain cells protected while the rest of the spreadsheet is password protected. The Protection class under...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.