Style problem - unable to delete it

klb

Well-known Member
Joined
Apr 3, 2002
Messages
821
I have a style in a large and complicated workbook (over 20 sheets) that I want to delete. Unfortunately it once was a Normal style in another workbook and I have been unable to delete it. I also have a "regular" Normal style that cannot be deleted.

I am trying to clean up this workbook for distribution to others in our organization. There are sheets within the workbook that will be made a part of other workbooks. Getting rid of this unwanted style is not critical it is just one of those things that bug me. (we have all been there)

Any help would be greatly appreciated.
 
More information on the same subject in this tread: http://answers.microsoft.com/en-us/office/forum/office_2007-excel/excel-found-unreadable-content-in-bookname-without/957efce2-fdc8-4d47-94f6-dab6670604b0?page=2<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Open XML file manipulation is the best way to deal with this. VBA or other Excel OM based algorithms can’t delete styles marked as hidden or built-in. OOXML based programmatic solutions (vs. doing it by hand) would eliminate the risk of corrupting the file, but doing the cleanup by hand works to. Excel client save of the file post manual update of styles.xml would take care of removing other content like custom number formats no longer referenced in styles definition nodes. You should see noticeable file size drop after the cleanup and save.<o:p></o:p>
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
DrillRaider, thanks for posting this. I had a spreadsheet with 64,841 different styles in it (probably due to multiple repairs over the years). I'm not an XML user, but this worked like a charm.
 
Upvote 0
Went through multiple forums, tried multiple macros (even from MS Website), and this is the only thing that worked. Thank you for posting. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
 
Upvote 0
Thanks! I was able to delete a few problem styles without having to reset styles that I had already modified and used in the file. Awesome!
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top