Excel cell font size different from actual & date format doesn't display correctly

WebViewer Version: 10.10.1

Do you have an issue with a specific file(s)?
Can you reproduce using one of our samples or online demos? yes
Are you using the WebViewer server? no
Does the issue only happen on certain browsers? no
Is your issue related to a front-end framework? no
Is your issue related to annotations? no

Please give a brief summary of your issue:
(Think of this as an email subject)

  1. Font size is excel cells are not consistent with actual excel file.
  2. Date is not being formatted properly
  • actual excel: yyyy/mm/dd
  • webviewer: mm-dd-yy

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
It does not happen all the time, there are certain sheets where font size is consistent, there are other sheets that are larger than actual.
The two problems mentioned above can be seen in the screenshots below:
Actual Excel:
actual

Webviewer:
webviewer

The office file was loaded using

instance.UI.loadDocument(blob, {
          filename: "filename",
          extension: "xlsx",
});

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Hello @nathaniel.isaac.yu,

Thank you for posting on our forum.

To diagnose further we require the following information.

  1. Source input XLSX files used for testing
  2. JavaScript console output showing all warnings and errors.
  3. Network panel showing all failed network traffic
  4. Can you reproduce the issue using our samples (especially on our site)? Such as our demo showcase: https://showcase.apryse.com/
  5. Are you able to reproduce the issue on our latest release (Version 11)?
  6. Does the issue only occur in certain browsers and/or devices? If so what are the details?

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

Hello @jromanocarlsen

Yes, both are reproducible in the demo page.

  1. For the font size issue - *resolved
  • I was using a different font for the headers (Meiryo), so I guess webviewer did not have that font and used a different one as fallback, causing the inconsistencies in sizes.
  • After chaning it to β€œMeiryo UI”, all fonts were the same and displayed as expected
  1. For the date issue
    ApryseDateTest.xlsx (9.3 KB)
  • If a date is entered in a cell, say 2024/11/18
    • this renders as β€œ2024-11-18” in webviewer
  • If a date is inputted with apostrophe at the beginning β€œ'2024/11/18” (in excel this indicates that cell is a string?)
    • this renders correctly as β€œ2024/11/18” in webviewer

Is there a way to preseve the formatting of the date? It is difficult to ask end users to always put apostrophe whenever they want to use dates.
Please advise, thank you.

1 Like

Hello @nathaniel.isaac.yu,

Thank you for the test file.

When viewing the excel file in Microsoft Excel, it looks like the formatting of the date cells seems to be set to a regional-specific date format (indicated by the β€˜*’ before the type):

We recommend ensuring that the date format is set to a non-regional specific type to ensure the result is consistent in other viewers like WebViewer.
When swapping the type to a non-regional-specific date format such as β€œYYYY-MM-DD”, the date appears as you expected in WebViewer:

I’ve also attached the modified excel file for you to test on your own environment.
ApryseDateTest - modified.xlsx (10.1 KB)

It is also worth noting that certain delimiters (where it is a β€˜-’ or a β€˜/’) may be affected by the current locale. You can set the officeOptions.formatOptions in the options parameter of the WebViewer constructor to adjust this. See this API doc for more info: https://docs.apryse.com/api/web/Core.html#locale

Let us know if this works for you!

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like