Archive for May, 2013

Excel Styles and formats

Friday, 31st May, 2013

Hopefully we all know what a disaster zone this area is so I won’t dwell on that is this post.

I have a specific question related to an ongoing support incident raised with MS.

We have some (admittedly old) workbooks with unusual style names, that cannot be deleted via code. In fact just trying to access them causes an error (in VBA, C#, C and XLM).

I wonder has anyone else seen this? does anyone know the cause? (To me it looks like an old culture/unicode issue simply because I have seen oriental and Cyrillic characters elsewhere in the styles list. (MS feel it came form a non MS source)

excelstyle1

In Excel 2003 these styles can cause the file to refuse to open with invalid file format or unreadable content type errors. 2010 opens them fine, but you still can’t delete them via the UI or code.

xmlstyle

The only way we have found so far is to save as xlsm and manually edit the xml to remove those rows. There are other tools but for this post I really just want to know if anyone else has seen these uneditable styles and if anyone knows the cause?

thanks for your help

cheers

simon