What does <color indexed = "81"> mean?
I have a document created by Excel 2007:
<fileVersion appName="xl" lastEdited="4" lowestEdited="4" rupBuild="4506" codeName="{B7FE6334-C1A2-E50D-BD3D-5F4D41BBC2E3}"/> ... which contains the following color in the font definition in xl/styles.xml :
<color indexed="81"/> I understand from the ECMA standard that this color index refers to the <indexedColors> collection in xl/styles.xml , if such a collection exists, otherwise it refers to the default palette shown in the standard. My problem is that this document does not contain an <indexedColors> element, and the default palette has only 66 entries, so I donβt know what 81 refers to. Does anyone else?
Interestingly, the google search for color indexed="81" returns some examples of OpenXML snippets that contain the same thing, but alas, no explanation.
The MSDN documentation defines the indexed property of the Color class in OpenXML as:
Indexed color value. Only used for backwards compatibility. References a color in indexedColors. The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype. This is part of the larger DocumentFormat.OpenXml.Spreadsheet namespace .
The file you are describing was created through source code that contains a value of 81. It probably looked something like this: Java code defining an instance of Color () with 81U from an unrelated color index.
If you need to find out why, I would create an MSDN account and respond to a message from Jack9999 asking why he used this value. I suppose this is a mistake on his part, familiar with a separate and possibly color index associated with JAVA.
Excel - without recognizing it - just uses the default comment color values.
Greetings
NECRO Answer: From Vincent Tan SpreadsheetOpenXmlFromScratch:
For colors, if you are dealing with the DocumentFormat.OpenXml.Color class, there are 3 ways to set the color value:
- Indexed color
- RGB color
- Thematic color
Here is the Auto of the Color property. I have not found any use for this, and you can probably ignore it. Excel will not suffocate from errors unless you install it anyway ...
Indexed colors are designed for backward compatibility, so I wonβt teach you how to do this. This is basically the index value for the color palette stored in the table style sheet. In the next chapter, we will look at a class of styles. You can independently study the IndexedColors class, which is a child of the Colors class, which, in turn, is a child of the style class.