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.

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?

tomason
 
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:
sheet.AutoFitColumn(2);
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