Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

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