Hi all,
I using aspose cell 19.2 and export excel file has multiline content.
When I open it, these lines not break line.
But I try double click to edit (column “Description” line 14-18), it display correctly
Here is my sample code:
var _wb = new Workbook();
var _ws = _wb.Worksheets[0];
var _zStr = @"Line 1
Line 2
Line 3
Line 4";
var _cell = _ws.Cells[0, 0];
_cell.PutValue(_zStr);
_ws.Cells.SetRowHeightPixel(0, 90);
_wb.Save("d:\\test.xlsx", Aspose.Cells.SaveFormat.Xlsx);
@DungLT,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.
Well, you need to specify style (to be applied) with wrapping text option on for the cell, see the updated code segment for your reference that works fine:
e.g Sample code:
var _wb = new Workbook();
var _ws = _wb.Worksheets[0];
var _zStr = "Line 1\n\nLine 2\nLine 3\nLine 4";
var _cell = _ws.Cells[0, 0];
Style style = _cell.GetStyle();
style.IsTextWrapped = true;
_cell.PutValue(_zStr);
_cell.SetStyle(style);
_ws.Cells.SetRowHeightPixel(0, 90);
_wb.Save("e:\\test2\\test.xlsx", Aspose.Cells.SaveFormat.Xlsx);
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.