Issue with AutoFitRows Not Showing Hidden Rows

I am testing Aspose.Cells .NET 18.3.9 and using the autofit row/col feature then creating a PDF file.

I have a test document with the following:

  • a hidden column, colored different for easy testing
  • several columns sized too narrow for the content
  • two hidden rows, also colored differently for easy testing
  • two rows that are sized to show partial text

When testing AutoFitRows, the hidden rows are never shown. The partial height rows are resized correctly, and the hidden column and and all of the narrow columns are also resized and shown as expected. The colored hidden rows never appear in my resulting PDF.

Also, in the created PDF, some of the gridlines around certain cells are not drawn correctly.
IncorrectGridlines.png (30.8 KB)

This is my sample Excel sheet: AutoFitRowsColumns-HiddenColERow37-38.zip (11.5 KB)

This is the code I am using:

if (AutoFitRows)
{
    foreach (Aspose.Cells.Worksheet wSheet in wBook.Worksheets)
    {
        Aspose.Cells.AutoFitterOptions afo = new Aspose.Cells.AutoFitterOptions
        {
            IgnoreHidden = false
        };

        wSheet.AutoFitRows(afo); 
    }
}

Thanks,

Sheri

@sheri_steeves

Thanks for using Aspose APIs.

We were able to observe this issue as per your description and found that when we select the column in MS-Excel and auto fit rows, hidden rows are also displayed. But such thing does not happen with Aspose.Cells.

We have logged this issue in our database for investigation and for a fix. Once, the issue is resolved or we have some other news for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-46049 - AutoFitRows not showing Hidden Rows

@sheri_steeves

Thanks for using Aspose APIs.

We were able to observe this issue as well and logged it in our database as follows.

  • CELLSNET-46052 - Some of the Gridlines around some Cells are not drawn correctly

@sheri_steeves

This is to inform you that we have fixed both of your issues (i.e. CELLSNET-46049, CELLSNET-46052) now. We will soon provide the fix after performing QA and including other enhancements and fixes.

@sheri_steeves

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

@shakeel.faiz

The hidden rows issue (CELLSNET-46049) is resolved.

Issue CELLSNET-46052 - Some of the Gridlines around some Cells are not drawn correctly is not resolved.

If I am auto-fitting both rows and columns, it is correct.

If I don’t autofit, or only do the rows the Pen Set cell is not drawn correctly. If I autofit only columns and then column to the immediate right is auto-fitted and the cell is drawn correctly.

I also noticed that the right hand border on the title/header row rightmost column is not drawn correctly either.

IncorrectGridlines-NoAutoFit-18.4.png (33.0 KB)

@shakeel.faiz

Hold up on this a minute, I was testing against the NuGet version 18.4.0, not 18.4.1.

I’ll retest and let you know.

@shakeel.faiz

I retested and both issues are fixed.

The only other issue I saw was that the rightmost column header is not drawn correctly.
I did find that Excel’s print preview of this spreadsheet shows this as well.

Sheri.

@sheri_steeves

Thanks for your feedback and using Aspose APIs.

It is good to know that both of your issues are fixed now. For your next issue, we will look into it and help you asap.

@sheri_steeves

Please explain this issue in more detail with sample code. Also provide us your screenshots. If this issue exists both in Microsoft Excel and Aspose.Cells, then it is not the issue but the Microsoft Excel behavior. Besides, we recommend you to create a new topic for your new issue. Since topics/threads are linked with issue tickets in the database, so ideally a single topic/thread should deal with single issue as it is fixed more quickly because it is easily manageable.

@shakeel.faiz,

I re-tested the issue with the rightmost column header drawing incorrectly and Aspose is giving me the same results as Excel when printing or Exporting to PDF.

If the last column is too narrow, the right side border of the heading row is not drawn, or is overwritten by the text in the cell. It draws correctly if the cell is auto-sized.

This is an Excel “feature”.

Thanks,

Sheri

@sheri_steeves

Thanks for the feedback and using Aspose APIs.

Based on your feedback, we can close this topic/ticket now. Let us know if you still have any concerns or facing any issue, we will look into it and help you asap.

The issues you have found earlier (filed as CELLSNET-46052) have been fixed in this update. Please also check the document/article for your reference: Install Aspose Cells through NuGet|Documentation