Custom classes allow you to format each column, using JSON and CSS.
A custom class can be assigned to a column (field) using field comments
In the following example of a field comment, class "amount" will be assigned to the column (field)
|XL.header:e-mail|XL.class:amount|XL.filterButton:true|
Here is an example of a JSON object that you can paste to the Custom Classes field.
{
"amount":{
"font":{},
"align":{}
},
"red":{
}
}supported Font attributes:
{
"name":"", //Font name. 'Arial', 'Calibri', etc.
"family":"", //Font family for fallback. An integer value. 1 - Serif, 2 - Sans Serif, 3 - Mono, Others - unknown
"scheme":"", //Font scheme. 'minor', 'major', 'none'
"charset":""; //Font charset. An integer value. 1, 2, etc.
"size":20, //Font size. An integer value. 9, 10, 12, 16, etc.
"color":{}, //Colour description, an object containing an ARGB value. { argb: 'FFFF0000'}
"bold":false, //Font weight true, false
"italic":false, //Font slope true, false
"underline":"", //Font underline style true, false, 'none', 'single', 'double', 'singleAccounting', 'doubleAccounting'
"strike":"", //Font strikethrough true, false
"outline":"", //Font outline true, false
"vertAlign":"" //Vertical align 'superscript', 'subscript'
}Alignment
{
"horizontal":"", //left, center, right, fill, justify, centerContinous
"vertical":"", //top, middle, bottom, distributed, justify
"wrapText":"", //true, false
"shrinkToFit":"", //true, false
"indent":"", //integer
"readingOrder":"", //rtl, ltr
"textRotation":"", //0 to 90, -1 to -90, vertical
}Borders (top, left, bottom, right, diagonal (up and/or down)
{
"style":"", //thin, dotted, dashDot, hair, dashDotDot, slantDashDot, mediumDashed, mediumDashDotDot, mediumDashDot, medium, double, thick
"color":"",
"up":"", //true / false, only for diagonal
"down":"", //true / false, only for diagonal
}Example:
{
top: { "style":"thin","color":{argb:'FF00FF00'} },
bottom: { "style":"dotted" },
diagonal: { "up":true, "thick" }
}