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.

Tue Nov 29, 2016 8:08 am

Hi,
Is there way to force the richtext to start new line?
I tried to add "\n" but it didnt help..

range.RichText.Text = range.RichText.Text + "\n"

Thank you!
Sara.

sarafrank.ssf@gmail.com
 
Posts: 12
Joined: Wed Dec 09, 2015 9:32 am

Tue Nov 29, 2016 9:22 am

Dear Sara,

Thanks for your inquiry.
Please try to use the property IsWrapText, and here is sample code for your reference.
Code: Select all
            sheet.Range["A1"].RichText.Text = "Welcome to \nE-iceblue";
            sheet.Range["A1"].IsWrapText = true;

If there is any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Nov 30, 2016 7:50 am

Dear Sara,

Did you test the code I provided ? Has your issue been resolved ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Dec 02, 2016 9:35 am

Thank you very much!!

I changed range.Style.WrapText to range.IsWrapText and it solved the problem...

Thank you!
sara.

sarafrank.ssf@gmail.com
 
Posts: 12
Joined: Wed Dec 09, 2015 9:32 am

Mon Dec 05, 2016 1:29 am

Dear Sara,

Thanks for your feedback.
Welcome to write to us again for further question.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS