473,796 Members | 2,875 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 "Programmat ic 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 1322

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

Similar topics

12
2206
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 article about ways of protecting your images from being downloaded. It was my understanding that if the client sees it, then it's in the client cache. Am I wrong in this belief or not? I took the information in the article and created the .asp that...
1
1332
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 to accomplish this (such as maybe password protecting the tables or otherwise)? I am fairly new to SQL server - so would appreciate any pointers to this. Thanks a ton!
6
1779
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 completion. I have recently become aware of the ease at which a .NET assembly can be disassembled into its easily readable, underlying CLI code. I can see that it would not be difficult for a malicious user to disassemble, modify, and then...
9
13836
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") rng.AutoFilter() Unfortunately I get an exception on the second statement, with the unhelpful message:
3
1510
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 : In VS2003 MyClass:: Method(int x, int y ) // We can collapse here { if( x < y ) // we can even collapse here also
1
2806
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 working the way we need it to prior to switching users over to it. Each team has a workbook, each workbook contains multiple worksheets, only some of the sheets contain the ranges that I want to import.
12
1956
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 them from giving it to anyone they feel like. The program produces reports that are specific to a particular organization but that does stop anyone from just modifying that report to make it specific to another organization, who they might have...
3
10546
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 and i dont know what i did wrong. Here is my coding book = app.Workbooks.Open(dir, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type. Missing,...
1
1762
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 Formatting has 2 variables for cell_locked and formula_hidden, tbh I only need to alter cell_locked to 0 to make those cells writable but changing that on a global scale ends up with everything I write being "writeable" if you re-open the file...
0
9679
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10172
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9050
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
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 we have to send another system
3
2924
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.