Class TextRotation

  • TheTextRotation class allows access to text rotation settings for a cell.

  • You can get the rotation angle in degrees using thegetDegrees() method.

  • TheisVertical() method checks if the text is stacked vertically.

TextRotation

Access the text rotation settings for a cell.

Methods

MethodReturn typeBrief description
getDegrees()IntegerGets the angle between standard text orientation and the current text orientation.
isVertical()BooleanReturnstrue if the text is stacked vertically; returnsfalse otherwise.

Detailed documentation

getDegrees()

Gets the angle between standard text orientation and the current text orientation. Forleft-to-right text, positive angles are in the counterclockwise direction. If the text is setto stack vertically, this method returns0.

Return

Integer — The degrees between standard text rotation and the current text rotation.


isVertical()

Returnstrue if the text is stacked vertically; returnsfalse otherwise.

Return

Boolean — Whether or not the text is stacked vertically.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.