Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Jan 12, 2011 9:14 am

When I search for your demo Style in Spire.XLS, there are many styles, but they don't match my requirement. I want to set the text of the worksheet diagonal down. How to realize it?

tom
 
Posts: 14
Joined: Tue Nov 30, 2010 7:21 am

Wed Jan 12, 2011 9:51 am

Thank you for your inquiry. You can find that in our demo, there are three ways to set the text position, they are VerticalAlignment, HorizontalAlignment and Rotation. To your condition, you may set the rotation 135 to make the text diagonal down with the following source code:
sheet.Range["A1"].Style.Rotation = 135;
e-iceblue support
User avatar

iceblue support
 
Posts: 240
Joined: Tue Dec 21, 2010 2:56 am

Return to Spire.XLS