Tab on UI- when reflected in Excel using Aspose; junk character comes instead

Hi,

I am using Aspose.cells for Excel Printing of my data.
But when a data consisting a Tab char in it, the character gets corrupted.

I have used. Cell.setValue to set the data in a cell.

Can anyone Please Help!!

Regards,
Aslam


Hi Aslam,


Please give us your sample code and attach you Excel file to show the issue, we will check it soon.

Thank you.

Amjad,

Please find the attached Excel and the screen shot for the same.
And the code below that writes the data.

private static void setCellValue(Cell a_cell, Style a_style, String a_Val, Locale a_Locale) throws Exception
{
String w_Val = Utilities.reverseGetHTMLDisplayString(I18N.get(a_Val, a_Locale));
a_cell.setValue(w_Val);
if (a_style != null)
a_cell.setStyle(a_style);
}

Regards,
Aslam

Hi,


We could not find the issue by simply setting string value that contains tab character for the cell. Kindly give us your String value of w_Val variable, so that we could check your issue soon. We do not need your logic such as Utilities. We only need the string value that you set to the cell that could reproduce the issue, such as:
e.g
cell.setValue("…");
workbook.save(…);


Thank you.

Amjad,

This is next steps narrative

The above line is the text in the variable w_Val.
Note there are spaces before and after the text.
So copy the text with the spaces.
You can do a SHIFT+END on that line to get the entire text with the spaces.

Regards,
Aslam

Hi,


I have tested your issue with latest fixed version v2.5.4.19: Aspose.Cells for Java v2.5.4.19
It works fine. See the attached output file and screen shot for reference.

Sample code:
Workbook workbook = new Workbook();

workbook.open(“CBPS000015CMPProject_Demo_f.xls”);
Cell cell = workbook.getWorksheets().getSheet(“Risks”).getCells().getCell(“D27”);
cell.setValue(" This is next steps narrative ");
workbook.save(“outCBPS000015CMPProject_Demo_f.xls”);

Please try the latest fix.

Thank you.

Hi Amjad,

We are on aspose-cells-2.5.1 Release. Could you recollect such an issue on this release. And the Aspose team have fixed the same in the upcoming releases.
Till then, I’ll surely try it out with the latest release.

Regards,
Aslam

Hi,


We are not sure if this was an issue with older version e.g v2.5.1 that you are using or even in the other older versions that were released after v2.5.1. We are on the continuous process of enhancement with each and every new release of the product. Also, I am afraid, we cannot add/amend any modifications in the older versions. We only add or modify changes in the latest version/fix, so you should use our latest version/fix (v2.5.4.x). Moreover, this is our company’s policy and we cannot go against it.

Thank you.