Call autofit rows does not take into consideration data in hidden columns

Hi,


We have found another issue with autoFitRows method. It does not take into consideration data in hidden columns:

public void autoHeight() throws Exception {
Workbook wb = new Workbook();
Worksheet worksheet = wb.getWorksheets().get(0);
Cells cells = worksheet.getCells();
Row row = cells.getRows().get(0);

System.out.println("Initial size: " + row.getHeight());

// Set the width of first column
cells.setColumnWidth(0, 10);
// Set wrap text option for cells
Style style = cells.get(0, 0).getStyle();
style.setTextWrapped(true);
cells.get(0, 0).setStyle(style);
cells.get(0, 1).setStyle(style);
cells.get(0, 2).setStyle(style);

// Merge cells
cells.merge(0, 1, 1, 2);

System.out.println("After change cell format: " + row.getHeight());

cells.get(0, 0).putValue(“This is a autoFitRows call test”);
cells.get(0, 1).putValue(“This is a merged cells to test auto-fit in scope of hidden column”);

cells.hideColumn(0);

// Apply auto-fit
AutoFitterOptions options = new AutoFitterOptions();
options.setOnlyAuto(true);
options.setAutoFitMergedCells(false);
options.setIgnoreHidden(false);
worksheet.autoFitRows(options);

System.out.println("After call autoFitRows with data on sheet: " + row.getHeight());

wb.save(“d:\test.xlsx”);
}


Output looks as follows:
Initial size: 12.75
After change cell format: 12.75
After call autoFitRows with data on sheet: 12.75


If you open output file in MS Excel, it automatically fits first row even first column is hidden (height of the first row 38.25 instead of 12.75).

Could you fix this issue (or add an option to AutoFitterOptions to take into consideration data in hidden columns)?

Thanks.

Hi Anvar,


Thank you for providing your source code.

We have evaluated your presented scenario while using the latest version of Aspose.Cells for Java 8.2.0.4, and are able to replicate the problem of incorrect row height with hidden column. The problem has been logged in our bug tracking system under the ticket CELLSJAVA-40990 for further investigation & correction purposes. Please spare us little time to properly analyze the problem cause on our end. In the meanwhile, we will keep you posted with updates in this regard.

In case you have further questions or concerns, please feel free to write back.
Hi,

Could you estimate time frame to resolve this issue?

Thanks.

Hi Anvar,


Thank you for writing back.

Unfortunately, the ticket attached to this thread is currently pending for analysis, and is in the queue with other tasks. Once we have isolated the problem cause, we will be in a better position to estimate the release schedule for the fix. We have recorded a note for the concerned development team member to schedule the ticket for investigation at earliest possible. As soon as we receive any updates in this regard, we will post here for your kind reference.

We are sorry for the inconvenience caused to you.
Hi Anvar,

Thank you for your patience with us.

Please try the latest version of Aspose.Cells for Java 8.2.1.2 as we have fixed the issue logged earlier as CELLSJAVA-40990 with this release. In case you face any difficulty, please feel free to write back.

The issues you have found earlier (filed as CELLSJAVA-40990) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.