Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

FwXlsxCellAlignment / Horizontal / Vertical

FwXlsxCellAlignment():Horizontal() / :Vertical()

Selects horizontal and vertical cell alignment.

FwXlsxCellAlignment / Horizontal / VerticalAdvPL
01 · OVERVIEW

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.)

02 · SYNTAX

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()
03 · PRACTICAL EXAMPLE

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 Nil
Expected result

Configures 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.

BEST PRACTICES
  • 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.

Related content

REFERENCES
  1. TOTVS. FwXlsxCellAlignment | FwXlsxHorizontalAlignment | FwXlsxVerticalAlignment. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha