At runtime (when you run an export), a JSON object is going to be created to describe the Excel Worksheet.

The data part will of course come from the current found set, but the formatting needs to be prepared upfront in Export templates.


The appearence of the Excel worksheet will be determined by several things:

- the layout name used as a template

- the field objects on this layout, their position and width

- and the field comments


Namely, here is how a column appearence is defined in JSON:

{      
  "header": "",    //Title of the column
  "width": Integer,    //If empty, inherited from the layout object
  "style": StyleObject  //Style of the column
  "class": "",      //space separated list of classes to apply to 
  "hidden": Boolean,  //True or False
  "outlineLevel": Integer,  //number of columns to outline to
  "totalsRowFunction": ""   //function used in the total row (sum, min, max, average, countNums, count, stdDev, var, none)
}


These attributes can be defined in the field comments using this syntax:

some text|XL.header:my title|XL.hidden:true|some more text

note that you can still use fields comments for other purposes ("some text" and "some more text" are not part of this module).

If you need to use decimal numbers, use the dot (.) as a decimal separator.
We take into account what is between the first and the last | (pipe). Each attribute is defined as XL.attributename (case sensitive), and attributes are separated by a | (pipe)
In the above example, the column header will by "my title" and the column will be hidden.


If not specified, the column width is defined with the width of the layout object. If you want to define it in the field comments, you need to take into account the way Excel manages width, which is… well, the Microsoft way. http://www.tmssoftware.biz/flexcel/doc/net/tips/understanding-excel-measurement-units.html

Class attribute refer to custom classes, which let you define the appearance of each column independently.