Hi,
please check following code.
xlsLic.SetLicense(“Aspose.Total.lic”);
Workbook wb = new Workbook(“Example vbCrLF and vbCR.xlsx”);
string newvalue = “Current month /\r\nquarter prior year”;
wb.Worksheets[0].Cells[“A2”].PutValue(newvalue);
wb.Save(“Example vbCrLF and vbCR new.xlsx”);
Workbook wbNew = new Workbook(“Example vbCrLF and vbCR new.xlsx”);
string resultA2new = wbNew.Worksheets[0].Cells[“A2”].StringValue;
If you look to workbook ‘Example vbCrLF and vbCR new’
the chr(13) is missing AFTER saving.
Kind regards,
Guido
Hi Guido,
Hi,
Hi,
that is strange.
I use 8.5.3.3 already.
I still have the issue with my workbook (attached above).
But not with your workbook.
Can you test it with my workbook ?
Kind regards,
Guido
and you add a formula:
=“Current month /”&CHAR(13)&CHAR(10)&"quarter prior year"
but we use simply text
Current month /
quarter prior year
That looks equal but it is not the same.
Hi,
Thanks for your posting and using Aspose.Cells.
I have tested your issue with the sample code given by you in the first post with your source excel file which you have attached in the first post and did not find the issue. I used the latest version: Aspose.Cells
for .NET v8.5.2.2.
Both strings are same.and ret is true which means both are same.
C#
Workbook wb = new Workbook(“Example vbCrLF and vbCR.xlsx”);
string newvalue = “Current month /\r\nquarter prior year”;
wb.Worksheets[0].Cells[“A2”].PutValue(newvalue);
wb.Save(“Example vbCrLF and vbCR new.xlsx”);
Workbook wbNew = new Workbook(“Example vbCrLF and vbCR new.xlsx”);
string resultA2new = wbNew.Worksheets[0].Cells[“A2”].StringValue;
//True means both are same
bool ret = newvalue == resultA2new;