Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, I never found the solution to locking stuff down within the XML.
Ultimately, what I ended up having to do is: 1. Do as much as I can with the SpreadsheetML document 2. Programmatically open the SpreadsheetML doc as an Excel workbook and apply locking / cell editing. Not the best of worlds, but I've resigned myself to it. In terms of advice, the only thing I can think of offering is the process for locking down a spreadsheet programmatically goes kinda like this: For each cell range you want to keep editable: currentRange.Locked = false For each worksheet you want locked currentSheet.Protect(password) And then workbook.Protect(password) It's sorta backwards: where you probably (and I do) want to specify certain cell ranges that cannot be editable, Excel works the other way. In Excel, you're describing what cells you want to continue to be editable. You have to opt-in instead of opt-out. Hope that helps! Rush "franciepants" wrote: Hi R Rush - I was wondering if you ever found an answer to your question. I too am trying to programmatically protect specific cells but have only been able to protect the entire worksheet. In my scenario, I generate XML code via Access which in turn creates an Excel spreadsheet. I have successfully created the spreadsheet, added and formatted specific rows but the protection tags seem to protect the entire worksheet. Any advice would be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Removing protections that prevent me from editing formulas. | Excel Worksheet Functions | |||
How to prevent editing within a specific cells? | Excel Discussion (Misc queries) | |||
How do I prevent editing in a cell based on the value in another? | Excel Worksheet Functions | |||
Prevent Locked for Editing on a network | Excel Programming | |||
Permit DoubleClick but prevent other editing | Excel Programming |