Skip to content

method SetPagOrientation

Saulo Martins edited this page Jul 4, 2026 · 1 revision

SetPagOrientation

:SetPagOrientation(cOrientation)
Define a orientação do papel na impressão da planilha atual


Parâmetros

Parâmetro Tipo Descrição Obrigatório Obs
cOrientation caractere Orientação: "default", "landscape" (paisagem) ou "portrait" (retrato) Default "default"

Retorno

Caractere - orientação aplicada

Exemplo

Local oExcel := custom.excel.Xlsx():New(cNomeFile="TstYExcel",cTipo="A")
oExcel:ADDPlan("Teste")
oExcel:SetPagOrientation("portrait") //Retrato
oExcel:Pos(1,1):SetValue("Olá Mundo")
oExcel:Save(GetTempPath())
oExcel:OpenApp()
oExcel:Close()

Obs

As próximas planilhas criadas seguem a mesma orientação definida.


Clone this wiki locally