Free Support Forum - aspose.com

Excel Accounting Underline is cut off on centered or right aligned text when exporting to PDF

Hello, when exporting an Excel to PDF and there is a cell that has Single Accounting underline option and either center or right alignment the line doesn’t cover the entire cell after export. Is there a work around for this? I saw an item in your release notes, but wasn’t positive if it would fix this issue or not (CELLSNET-47844 Wrong conversion of double underline accounting formatted cell when saving to PDF Bug). If it does fix the issue, is there a work around if we have an earlier version? In order to test this I have created the steps below to reproduce:

  1. Create a blank excel document
  2. Open the excel document for editing
  3. Select a cell in the excel document
  4. Right click on the cell and choose Format Cells.
  5. Choose Text on the Number tab
  6. On the Alignment tab choose Center for the Horizontal alignment. (leave the Vertical Alignment set to Bottom)
  7. On the Font tab, choose Arial for the font. Also choose “Single Accounting” for the Underline option.
  8. Type 2020 into the cell
  9. Click okay to save the changes.
  10. You should see 2020 in the cell with an underline below it that spans the entire width of the cell and not just under the text. Image
  11. Close the excel document and choose to save changes.
  12. Export>PDF (use Aspose for this)
    Issue:

The exported document shows the underline, but it only starts at the first character of 2020

Image

Expected Result:

The underline should be extending to the left further to cover the entire width of the cell with 2020 in the middle.

Image

@joe.larkin,
We have observed this issue and logged it inner database for further investigation. We will notify you here once any update is available for sharing.

This issue is logged as:
CELLSNET-47862 - Excel Accounting Underline is cut off on centered or right aligned text when exporting to PDF

@joe.larkin,
This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Thank you for your response. What is the date of the next release that will include this fix?

@joe.larkin,
You may please wait for a couple of days. We will provide you hotfix here whereas this fix will be available through NuGet package manager in the first week of March, 2021.

Thank you. I look forward to hearing your response on how to implement the hot fix.

@joe.larkin

Please try the latest fix 21.2.5:
Aspose.Cells21.2.5 For .Net2_AuthenticodeSigned.Zip (5.5 MB)
Aspose.Cells21.2.5 For .Net4.0.Zip (5.5 MB)
Aspose.Cells21.2.5 For .NetStandard20.Zip (5.5 MB)