FwXlsxPrinterConfig
FwXlsxPrinterConfig():MakeFont([jFontConfig])Builds font, format and border JsonObject configurations.
Overview
Static factories from LIB 20201009. Without arguments they return defaults; with a partial JsonObject they preserve supplied values and fill missing settings. MakeFont starts with Calibri 11; MakeFormat with black text, white background and no wrap; MakeBorder with disabled sides and None style. (Sources: refs. 1–1.)
Syntax
FwXlsxPrinterConfig():MakeFont([jFontConfig])Methods
MakeFontCompletes font configuration.FwXlsxPrinterConfig():MakeFont([jConfig])
MakeFormatCompletes cell formatting.FwXlsxPrinterConfig():MakeFormat([jConfig])
MakeBorderCompletes border settings.FwXlsxPrinterConfig():MakeBorder([jConfig])
Commented example
#Include "Protheus.ch"
User Function Ed461()
Local jFont := JsonObject():New()
// Fill defaults while preserving size and bold.
jFont["size"] := 14
jFont["bold"] := .T.
jFont := FwXlsxPrinterConfig():MakeFont(jFont)
ConOut(cValToChar(jFont["size"]))
FreeObj(jFont)
Return NilPreserves size 14 and bold; fills remaining properties. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Use exact property names: underline, hor_align, vert_align and border_color. Factories neither generate files nor apply configurations by themselves.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.