Adding Custom color in XLSreport--Styling--MxColor

I want to add custom color for a file export with XLSReport widget. I know how to add a new style but have limted colors. I have added my own custom color  “Champagne” which is successfully appearing for new style but this color is not appearing as background color of exported output column.  did mendix only recognize some specific colors? or do i need to add color code in some specific place?  or which colors could be added for background in XLSReport Styling?  
1 answers

Hi Ma,

I took a look at the java code for the excel exporter. There is a file called “” where the colors are defined. It looks like its using predefined colors provided by the poi library.

If you wanted to add more colors you can try adding a value to the “MxColor” enumeration and then add a case for it in “getColor” (line 173). You can get to this file by opening your project in file explorer, going to javasource > xlrsreport > report >

Here is a list of predefined colors.

The exporter might be using an older version of POI so you would need to double check that there are more available colors. 


I haven’t tested this yet so let us know if that works! Hope this helps!