Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Dear All,
Please let me know whether I can edit the header and footer if the worksheet is locked.
I need this so I can edit the document no which is in the header and footer.\
Suppose I can't do this then how do I insert the document no in such a way in the worksheet that it automatically displays in all the pages of the worksheet.
Please let me know whether I can edit the header and footer if the worksheet is locked.
If the worksheet has been locked for editing, no.
Suppose I can't do this then how do I insert the document no in such a way in the worksheet that it automatically displays in all the pages of the worksheet.
These are very cumbersome workaround's, but they might work.
Mike
Some members in the old forum where able to unlock sheets
I don't think that's quite true. I don't recall anyone saying they knew how to unprotect the worksheet. Even if they did, it probably would only apply to worksheets created in version 2001 or earlier.
I, and a couple of others, know how to unlock collapsed areas. For worksheets saved using version 2001i or later there are some specific requirements for that to be possible though, one of which is that the worksheet is not protected for editing.
I don't think that's quite true. I don't recall anyone saying they knew how to unprotect the worksheet. Even if they did, it probably would only apply to worksheets created in version 2001 or earlier.
Maybe that is what I meant.
I, and a couple of others, know how to unlock collapsed areas. For worksheets saved using version 2001i or later there are some specific requirements for that to be possible though, one of which is that the worksheet is not protected for editing.
Care to share the secret?
Mike
Care to share the secret?
Sorry, no. And especially not on a public forum. I figured it out for myself, and I believe both of the others did too. So as far as I know, nobody has shared it. Locked areas are there for a reason, and I am not going to invalidate that by disclosing how to open them.
Assuming that the problem is of this sort... where the sheet is locked before the number is assigned, but you do know this in advance...
Then I would suggest that you use the XML code settings and VBscript to get at a windows file properties value so that you then pass the value into the shhet at execution, even though it is locked.
Basically you add the document number to the windows file metadata (that is a right click in windows explorer), which is then accessed inside the worksheet. I 'think', but I'm not sure, that you can have the header data based on the worksheet XML data (Under the file menu properties inside mathcad). It (if it works) is a bit of a phaff, but should be possible.
Again this presuposes that you can set up a template so that you can allocate the document number after you have protected it. If it is a pre-existing sheet you will need help to crack the lost password.
Philip
What version of Mathcad was the sheet saved in?
Mike
Is this a one-off request, or a general need?
Thanks all,
No Bogeyman, it is not a one off requirement If there is a workaround then it will be used on an entire project which will be paid by client, so I guess unoffical methods of getting this work done is out of the question.
Actually it is quite frustrating to know that MathCAD doesn't have provisions of this sort.
Although I agree that unlike excel, MathCAD is one BIG active cell, but if it markets itself with the tagline 'Spend more time engineering and less time documenting' , then MathCAD at times really falls short.
But maybe as a new user it is my frustration speaking and MathCAD might not be that frustrating after all.
No Bogeyman, it is not a one off requirement If there is a workaround then it will be used on an entire project which will be paid by client, so I guess unoffical methods of getting this work done is out of the question.
I think that depends on the nature of the project and why the page numbers were not added before the worksheets were protected. If, say, it's a design for a bridge that has been approved at multiple levels, and the worksheets then locked, there is no way I would be the person that modified those worksheets in any way at all. If the bridge then had a problem, guess whose door they would be knocking on!
Actually it is quite frustrating to know that MathCAD doesn't have provisions of this sort.
Well, it does, mostly. You can set any region in the worksheet to allow editing when the worksheet as a whole is protected for editing. Unfortunately, the header and footer are not considered regions, and you can't allow editing of these. An oversight, I guess. But even if that was allowed it wouldn't do you any good, because you would have to allow them to be edited before you protected the worksheet. Presumably that wouldn't have been done, because is someone had thought of that they would have added the page numbers in the first place.
The reason I asked if it was a one-off is that I was going to offer to change the footer for you, but I wasn't prepared to post how to do that (as a personal policy, I don't post information that would allow one person to violate another persons security). Now that someone has posted how to unprotect a worksheet though, I guess the cat is out of the bag. You don't need to actually unprotect the sheet. Change the extension from .xmcdz to .zip, and unzip the file. Then change the extension to .xmcd. Open the file in Notepad and modify the section of XML for the footer (it's near the top of the file). You can get the desired XML by creating a new file with the footer you want, and just copying and pasting. Save the file.
I think that depends on the nature of the project and why the page numbers were not added before the worksheets were protected. If, say, it's a design for a bridge that has been approved at multiple levels, and the worksheets then locked, there is no way I would be the person that modified those worksheets in any way at all. If the bridge then had a problem, guess whose door they would be knocking on!
This is usually the problem especially within the Engineering sector. We have multiple programs which have where written many years ago by Engineers who have since left. These programs where sent out to be externally verified by industrial recognised companies, but as time goes on the standards the programs where wrote in accordance with have been superseded or new recommendations are found.
Even if the worksheet is modified the calculation or results produced should go through an internal checking process and ultimatley the books stops with the 'Approved signature' - Engineering manager.
Mike
ultimatley the books stops with the 'Approved signature' - Engineering manager.
Unless the engineering manager points the finger right back at you and says "he told me he hacked the file to change the page numbering, and maybe he also changed something else". Then they tie you into a chair, shine bright lights in your face, and starting asking questions: "Mr Armstrong; please explain why you hacked the file! Why did the cable drum buckle, resulting in the ship sinking with the loss of all hands? What part did you play in that, Mr Armstrong? Do you know what water-boarding is Mr Armstrong? If you don't answer our questions the way we want them answered, you might have first hand knowledge of that soon Mr Armstrong!".
Unless the engineering manager points the finger right back at you and says "he told me he hacked the file to change the page numbering, and maybe he also changed something else". Then they tie you into a chair, shine bright lights in your face, and starting asking questions: "Mr Armstrong; please explain why you hacked the file! Why did the cable drum buckle, resulting in the ship sinking with the loss of all hands? What part did you play in that, Mr Armstrong? Do you know what water-boarding is Mr Armstrong? If you don't answer our questions the way we want them answered, you might have first hand knowledge of that soon Mr Armstrong!".
Class.
Then again the EM would probably say he didn't know I had changed the 'Approved Mathcad program' - WALK THE BLANK MIKE
Mike
Mathcad document protection unlock procedure:
1) save document as *.xmcdz;
2) open new xmcdz-file as archive and copy from its content (enhancementless);
3) open dearchived file in any text redactor and by force of CTRL+F find textline with word password;
4) finded textlin deleted, then CTRL+S;
5) “modificated” file inserted back into xmcdz-file(archive);
6) open xmcdz-file in Mathcad - voilà
Mathcad document protection unlock procedure:
1) save document as *.xmcdz;
2) open new xmcdz-file as archive and copy from its content (enhancementless);
3) open dearchived file in any text redactor and by force of CTRL+F find textline with word password;
4) finded textlin deleted, then CTRL+S;
5) “modificated” file inserted back into xmcdz-file(archive);
6) open xmcdz-file in Mathcad - voilà
Could you elaborate on the steps required to unlock?
Mike
OK. Let's admit, we have the protected from editing worksheet (created in Mathcad v11...15 [and may be an earlier versions..]) and want to unlock it.
Step 1: Open this worksheet in Mathcad and Save it as a Mathcad Compressed XML Document file (*.xmcdz).
Step 2: Open this last created xmcdz-file as an archive (e.g. in Total Commander, WinRAR etc.) and extract from it its content (enhancementless file with identical name).
Step 3: Find on disk and open the extracted file in any text redactor (e.g. in WordPad) and by force of combination CTRL+F search the text string which contains the word protection or password (e.g. <protection protection-level="high" password="bla-bla-bla" />).
Step 4: Completely delete the founded text string and save file (CTRL+S).
Step 5: “Modificated” file inserted back (packed) into the xmcdz-file(archive) (for this operation I used Total Commander).
Step 6: Open xmcdz-file in Mathcad and see that protection is removed from the worksheet.
P.S. But the protection of worksheet areas (in menu: Insert ---> Area; and which then locked) cannot be removed in such a way.
Alexander,
That is a good explanation and clears up some of the confusion about which bit of protection is the problem.
I have mainly used the Area locking for design files, where the trick is to use a password equal to the shown date (i.e. show the date). Thus when the file is used un-modified you can easy check the date stamps as a certificate of validity, whilst you can also let designers unlock the area and update or re-use the calculations else where and they then need to show the appropriate traceability and validity of the new usage and modifications. This is good for corporate design handbooks.
As you say, locked areas are almost impossible to crack (i.e. not simple!)
Philip