Backyard Adventures Garage

Tuesday, March 22, 2011

Excel changes my cells to Date from General

Dear All:
I've had this happen four times now on different machines at different times.

Excel 2007 when opening a Shared Workbook and changes all general formatted
cells on all sheets of the workbook to Date Format {mm/dd/yyyy}.

Changing the format back to general only means they again default to date at
the next opening, you must format to text or number to prevent the auto date
format application.

Here is how you fix it:

You have to modify the Normal Style.  This has been driving me crazy.  See below:

In Excel 2007 you can click on the 'Cell Styles' option on the menu bar. Then right Click on 'Normal' in the top left hand corner of the displayed styles and then select the 'Modify' option. you will see that the number format is set to date and time.

Select the format... button and then select whichever format you want for general numbers, e.g. two decimal places and red for negative. Click on 'Ok' and you should see that the format in the dialogue box has been reset to '0.00;[Red]0.00'. Click on OK, and then save the spreadsheet. You should find that all cells now default to this format for numbers rather than Date/Time.

Tuesday, March 1, 2011

Ammunition 67


Labels:

Remove Document Protection against Edit in Word 2007

I was trying to convert some case studies documents in SharePoint, to demonstrate that you are able to author content in Word, and publish them in HTML using document conversion process. But the document conversion process keep crashing because of certain elements in the Word document. But when I tried to edit, the document is protected against edit.

Knowing Word 2007 files are just xml files in a zip file, I did the following.

Rename the document to zip format
Open it up in my favorite zip program
Edit settings.xml in Notepad
Look for "protection" in the xml file, and you will locate <w:documentProtection> element.
Remove all the attributes in it.
Update the zip file
Rename the document back to docx
Open it up in Word 2007, and you are able to edit the document...