Assigning styles to rows in excel when using a Database-to-Excel map
When using a Database-to-excel map CoolSpools can not determine the type of row (e.g. header, column header, data, etc) to apply the relevant styles.
In this circumstance, to associate a style with a row in an Excel spreadsheet you should define a style with the same name as the relevant row group in your Database-to-excel map.
By defining the style name in this way you implicitly apply that style to the data in question. For example, a style called COL_HEAD will be implicitly and automatically applied to an map row group called COL_HEAD.
It is important to note that style names are case-sensitive so the style and row group names must match exactly in terms of case.
Here is an example.
A Database-to-excel map is created with the following row groups:
HEADINGS which contains the sub-row groups RPT_TITLE, SELECTIONS and COL_HD.
RECORD mapping the database fields to excel cells.
TOTALS
This command shows how to specify the styles for heading rows of the sheet.
CVTDBFXL FROMFILE(*MAP)
TOSTMF('Style_demo.xlsx')
STMFOPT(*REPLACE)
MAPNAME(STYLE_DEMO)
DFNSTYLES((COL_HD *YES *NO *GENERAL *NONE *BOTTOM
*DFT *NO *AUTOFIT *ARIAL 10 *YES *NO *DOUBLE)
(RPT_TITLE *YES *NO *GENERAL *NONE *BOTTOM
*DFT *NO *AUTOFIT *ARIAL 14 *YES *NO *NO *WHITE *BLUE)
(SELECTIONS *YES *NO *GENERAL *NONE *BOTTOM *DFT
*NO *AUTOFIT *ARIAL 10 *YES *YES))
EXCEL(*XLSX)