如何插入编程在C#中的Excel单元格的新行?单元格、Excel

由网友(爱你无期)分享简介:我使用的Aspose库创建一个Excel文档。某处在一些小区,我需要插入文本的两个部分之间新的线路。I'm using the Aspose library to create an Excel document. Somewhere in some cell I need to insert a new line...

我使用的Aspose库创建一个Excel文档。某处在一些小区,我需要插入文本的两个部分之间新的线路。

I'm using the Aspose library to create an Excel document. Somewhere in some cell I need to insert a new line between two parts of the text.

我试图为 r N的,但它不工作,只显示两个方形符号细胞。不过,我可以preSS Alt + Enter键创建在同一小区中的换行。

I tried "rn" but it doesn't work, just displays two square symbols in cell. I can however press Alt+Enter to create a new line in that same cell.

我要如何插入新行编程?

How do I insert a new line programmatically?

推荐答案

从细胞的Aspose论坛:How在单元格中使用新行字符用?

From the Aspose Cells forums: How to use new line char with in a cell?

在提供的文字,你应该设置单元格的IsTextWrapped风格真正

After you supply text you should set the cell's IsTextWrapped style to true

worksheet.Cells[0, 0].Style.IsTextWrapped = true;
阅读全文

相关推荐

最新文章