Content of some cells not fully displayed within the width of the column when printed to HTML

Hi Amjad.
Perhaps I did not communicate the issue properly.
We need to have DPI set to 96 (100%) .
One reason - that is how it is set on Linux 7 OS system where it is running (confirmed by printing out CellsHelper.getDPI() ).
Another reason - setting it to 144 increases the width of the generated table in HTML.
Attached is the zip file containing the following:

  • HTML generated from Excel “File” -> “SaveAs HTML” which shows there is no issue when saving to HTML directly from Excel worksheet “NumberFormats”.
  • Screenshot of the display resolution (100%); the input Excel template and the generated HTML from Excel
  • HTML generated by Aspose 23.8 that shows the issue with the last cell.
    Please let me know if you have any questions.
    Thank you,
    Yan

LocaleFormatting.zip (589.0 KB)

@oraspose,
Thanks for your feedback and details. We will investigate your issue further. Hopefully we can figure it out soon. Once we have an update on it, we will let you know.

@oraspose
1,If you change Display Scale as 100% (DPI 96 ) of your manchine, you will see #### when opening the file in MS Excel too.So when DPI is 96, we have to export ### to html as MS Excel with 100% Display Scale setting.

2, Please check 23.8.zip (16.8 KB)
with CellsHelper.setDPI(144);
If DPI is 144, the width of table will increase as displayed in MS Excel.

3, If you do not set dpi with CellsHelper.setDPI(144):
a) You can auofit width of the columns as the following :
Workbook workbook = new Workbook(dir + “LocaleFormatting.xlsx”);
for(int i = 0 ; i < workbook.getWorksheets().getCount() ; i++)
{
AutoFitterOptions options = new AutoFitterOptions();
options.setOnlyAuto(true) ;
workbook.getWorksheets().get(i).autoFitColumns(options);
}
workbook.save(dir + “23.8.html”);
b)Change your display setting of machine as 100%, then adjust columns’ width in MS Excel.

Is it feasible to provide some kind of “export option” that allows us to determine how to treat narrow column issue. In other words, have a new option that we can set - such that your HTML export would be reverted to the behaviour before release 21.11
For example, in 21.10 release for the same input Excel template the behavior produced proper HTML:

. . . 2,085,979.78 

@oraspose,

We will evaluate and get back to you soon.

Hello.
Is there an update on our request to have some kind of option allowing to revert the HTML generation behavior ?

@oraspose,

We are sorry but we have not evaluated it yet. We will analyze your requirements and get back to you soon.

We are sorry for any inconvencie caused!

@oraspose,

We have made some optimizations for your requirements in the next release 23.9. Please try the following code after 23.9 is released:

Workbook workbook = new Workbook(dir + "CELLSJAVA45538.xlsx");
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setPresentationPreference(true);
workbook.save(dir + "dest.html", saveOptions);

The issues you have found earlier (filed as CELLSJAVA-45538) have been fixed in Aspose.Cells for Java 23.9.

Hello.
The optimization looks good, thank you, it is an improvement compare to 23.08 version.
However, we have several non-US clients and using different locales on the server.
For some of the locales ( “es” , “fr”, “it” in particular) the issue with numeric values shown with hashes still exists.
Perhaps it is caused by extra non-breaking space in the table cell after the actual value. You would see it in the comparison between generated HTML for US locale and for French (FR) locale.
Attached is the zip archive containing the following:
LocaleFormatting_NumberFormats.xlsx - input template
LocaleFormattingDifferentLocales.java - small test program
NumberFormat_Locales_comparison.png - screenshot of comparison between generated HTMLS, highlighted the issue;
Various outputs, generated with older version of Cells (21.9.0) and new version (23.9.0) .
Please let us know if you need additional information.
Thank you.
toAspose_numberFormat.7z (138.1 KB)

@oraspose,

Through testing with sample files we can reproduce the issue. We have opened the ticket:CELLSJAVA-45629 in our internal issue tracking system. We will look into it soon.

@oraspose
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-45629

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

It appears there are more cases where content of the cells no longer displayed fully.
Attached is the zip archive containing the following:
LocaleFormatting_DateFormats.xlsx - input template for testing various date formats. Note the long date in cells D3 and E6 is not shown properly
LocaleFormatting_CurrencyFormats.xlsx - input template for testing currency formats. It is similar to the LocaleFormatting_NumberFormats.xlsx, with various symbols.
Output HTMLs generated with older version of Cells, as well as 23.9 version
LocaleFormattingDifferentLocales.java - sample program demonstrating the problem (only changed name of the input template)

Thank you.
toAspose_dateFormat_currencyFormat.7z (23.2 KB)

@oraspose,

Thanks for providing the zipped archive containing more test cases (source files, output HTMLs and sample code, etc.) regarding numbers formatting and Date formatting issues. We have logged it with your existing ticket “CELLSJAVA-45629” into our database. We will evaluate it and may consider to resolve it as well.

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

Can you please provide an update on the opened tickets CELLSJAVA-45538 and
CELLSJAVA-45629 . Are there plans to include them in the upcoming release of 23.10?
Thanks.

@oraspose,

We are sorry that both issues, “CELLSJAVA-45538” and “CELLSJAVA-45629”, have not been resolved yet. We will do our best to address these issues in the upcoming release of Aspose.Cells for Java v23.10.

We will keep you updated with any new information on these issues.

@oraspose,

We plan to fix your issues in the next week.

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

@oraspose,

This is to inform you that your issue has been resolved. The fix will be included in an upcoming release (Aspose.Cells v23.10) that we plan to release in the first half of October 2023. You will be notified when the next version is released.
Here is the output file after fix:CELLSJAVA-45538.zip (12.4 KB)

Hi Erik.
Thank you for providing the output for issue CELLSJAVA-45538.
Have you also checked the output for the other issue CELLSJAVA-45629:

And can you please attach that file as well?
Thank you,
Yan

@oraspose,

Both issues (“CELLSJAVA-45538” and “CELLSJAVA-45629”) are resolved. The fixes will be included in our upcoming release (Aspose.Cells v23.10) that we plan to release in this week or in the next week early. You will be notified when the new version is released.