HTML output discrepancy


#1

Hello,

I am converting a range of cells to html format using AsposeCells for Java latest version where the text contains spaces. I am using HtmlSaveOptions to achieve the same.

However, there is discrepancy in the output generated by Aspose and the MS Excel.

For example html output by MS Excel shows spaces as is:

six space before

whereas output by Aspose converts these spaces to   as shown below:

      six space before

For your reference I have also attached the excel document along with Excel and Apose generated outputs being used to generate the HTML output.

Can you please look into this on priority as it is one of our customers production issue.

Thanks,
Neeraj
files.zip (19.5 KB)


#2

@neergupta,

Thanks for the template file and details.

I have tested your scenario/case using the following sample code with our latest version/fix: Aspose.Cells for Java v17.12.2, (please try it), I found the issue but only with second line, i.e., having text “one space before” as single space is not inserted before the text:
e.g
Sample code:

Workbook workbook = new Workbook("F:\\Files\\htmloutput\\files\\table spaces.xlsx");
workbook.save("F:\\Files\\htmloutput\\files\\out1tablesapces1.htm", SaveFormat.HTML);

Please find attached the output HTML file in the archive for your reference:
files1.zip (10.9 KB)

See the screenshot when opening the output file into MS Excel for your reference:

Do you confirm this issue or you find any other issue (please elaborate)? After your confirmation, we will log a ticket for your issue, so it could be figured out soon.


#3

Hi,
Thanks for your response.
Yes this is one issue.
Additionally if you open both html files in browser, right click and click on ‘view source’ then you will notice the span element with   appearing in Aspose generated html but not in MS Excel generated html.

Thanks,
Neeraj


#4

@neergupta,

Thanks for your confirmation.

As we already found HTML output discrepancy(Issue). There is a difference for the output HTML by Aspose.Cells on how the spaces are rendered. I have logged a ticket with an id “CELLSJAVA-42487” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.


#5

@neergupta

Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSJAVA-42487 now. We will soon provide the fix after performing QA and including other enhancements and fixes.


#6

@neergupta

Please download and try the following fix and let us know your feedback.


#7

The issues you have found earlier (filed as CELLSJAVA-42487) have been fixed in this Aspose.Cells for Java 18.1 update.

Please also check the following document/blog for your reference: