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 and Java (J2SE and J2EE) application.

Fri Jan 21, 2011 3:22 am

I want to write many things in one cell in Excel, but I want to see it directly. I know I can use the autofit function, can other function realize it?

Posts: 11
Joined: Mon Dec 27, 2010 3:08 am

Fri Jan 21, 2011 8:27 am

Thank you for your inquiry!
Yeah, there are two ways to realize it. If you want to change the width of the columns, you may use the autofit method. For example:
What's more, you can also use text wrap method, the process of this method is through the WrapText property of text range. Code:
sheet.Range["B3"].Style.WrapText = true;
e-iceblue support
User avatar

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

Return to Spire.XLS