FwXlsxCellAlignment / Horizontal / Vertical
FwXlsxCellAlignment():Horizontal() / :Vertical()Selects horizontal and vertical cell alignment.
Overview
FwXlsxCellAlignment supplies cached objects for each axis; Horizontal and Vertical have different method sets. The official Vertical example calls Horizontal, apparently a copy error; we use Vertical according to its syntax and description. Codes feed MakeFormat or SetCellsFormat. (Sources: refs. 1–1.)
Syntax
FwXlsxCellAlignment():Horizontal() / :Vertical()Methods
HorizontalReturns horizontal-axis object.FwXlsxCellAlignment():Horizontal()
VerticalReturns vertical-axis object.FwXlsxCellAlignment():Vertical()
Center / TopAxis-specific alignment codes.oH:Center() / oV:Top()
Commented example
#Include "Protheus.ch"
User Function Ed460()
Local jFormat := FwXlsxPrinterConfig():MakeFormat()
Local oH := FwXlsxCellAlignment():Horizontal()
Local oV := FwXlsxCellAlignment():Vertical()
// Different axes, different methods.
jFormat["hor_align"] := oH:Center()
jFormat["vert_align"] := oV:Top()
ConOut(jFormat["vert_align"])
Return NilConfigures horizontal center and vertical top in memory. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Do not call Left/Right on vertical alignment. Apply formatting before writing cells.
- 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.