We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Text Orientation?

Is there a way to change the orientation of text within a cell? In other words, can I insert text into a cell that's slanted?

If you go into an excel spreadsheet, right-click on a cell, select "Format Cells", and then the "Alignment" tab, you'll notice there's an Orientation field that allows you to slant your text.

Can this be done in XlsIo?

Thanks.

-ryan

1 Reply

MW Melba Winshia Syncfusion Team January 26, 2007 05:24 AM UTC

Hi Ryan,

You can set the orientation (rotation) of the text inside the cell by using the Rotation property of the CellStyle object. Please refer the following code snippet that illustrates the above:

[C#]
//Text Orientation Setting
sheet.Range["A1"].CellStyle.Rotation = 60;
sheet.Range["A2"].CellStyle.Rotation = 90;

Please refer the following sample which implements the above said feature:

Orientation.zip

Please take a look and let me know if you have any other questions.

Best Regards,
Melba

Loader.
Live Chat Icon For mobile
Up arrow icon