XmlMappedRange.HorizontalAlignment Propriedade

Definição

Obtém ou define o alinhamento horizontal para o controle XmlMappedRange.

public object HorizontalAlignment { get; set; }

Valor da propriedade

Object

Um dos valores de XlHAlign.

Exemplos

O exemplo de código a seguir usa as HorizontalAlignment VerticalAlignment Propriedades e para alinhar o conteúdo de XmlMappedRange ao canto inferior direito. Este exemplo de código pressupõe que a planilha atual contenha um XmlMappedRange chamado CustomerLastNameCell.

private void AlignBottomRight()
{
    this.CustomerLastNameCell.HorizontalAlignment = 
        Excel.XlHAlign.xlHAlignRight;
    this.CustomerLastNameCell.VerticalAlignment =
        Excel.XlVAlign.xlVAlignBottom;
    
    this.CustomerLastNameCell.Value2 = "The contents " +
        "of this cell are aligned to the bottom right.";
    this.CustomerLastNameCell.RowHeight = 100;
    this.CustomerLastNameCell.ColumnWidth = 75;
}
Private Sub AlignBottomRight()
    Me.CustomerLastNameCell.HorizontalAlignment = _
        Excel.XlHAlign.xlHAlignRight
    Me.CustomerLastNameCell.VerticalAlignment = _
        Excel.XlVAlign.xlVAlignBottom
    Me.CustomerLastNameCell.Value2 = "The contents " & _
        "of this cell are aligned to the bottom right."
    Me.CustomerLastNameCell.RowHeight = 100
    Me.CustomerLastNameCell.ColumnWidth = 75
End Sub

Comentários

Algumas das XlHAlign constantes podem não estar disponíveis para você, dependendo do suporte a idiomas (inglês americano, por exemplo) que você selecionou ou instalou.

Aplica-se a