We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Data loss in html output of name ranges


We are working with Apose cells java version 17.1.0.
We have observed a major data loss in the html output of the named ranges containing some hidden rows/columns.

The given problem can be easily reproduced in the html output of following named ranges in the attached excel file:
- BWY_LandscapeTable2 - Data is lost after row 2
- TestLandscape - Data is lost from row 36 to row 61
- NewTestForMichele - Data is lost after row 65

For your reference, I have also attached source excel file as well as output html files generated by Aspose.

Following is the code snippet used to generate html output:
HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions(SaveFormat.HTML);

Range sourceRange = workbook.getWorksheets().getRangeByName(rangeName);

Workbook newWorkbook = new Workbook(FileFormatType.XLSX);
WorksheetCollection targetWsc = newWorkbook.getWorksheets();
com.aspose.cells.Worksheet targetWs = (com.aspose.cells.Worksheet) targetWsc.get(0);
Range targetRange = targetWs.getCells().createRange(0, 0, sourceRange.getRowCount(), sourceRange.getColumnCount());
PasteOptions options = new PasteOptions();
targetRange.copy(sourceRange, options);
int rowCount = sourceRange.getRowCount();
int firstRow = sourceRange.getFirstRow();

for (int i = 0; i < rowCount; i++) {
double rowHeight = sourceRange.getWorksheet().getCells().getRowHeight(firstRow++);
targetWs.getCells().setRowHeight(i, rowHeight);
targetRange.copy(sourceRange, options);

newWorkbook.save("c:/out.html", htmlSaveOptions);

Kindly look into this on higher priority as this issue has come up from one of our customer's production environment. Kindly note that the sensitivity of this issue is very high as it is a case of major data loss in customer's production environment.


Hi Neeraj,

Thank you for sharing the samples.

I have evaluated the presented scenario and I am able to replicate the said issues on my side, however, I need a confirmation from your end just to make sure that we are on the same page. If you check the attached archive, you will find spreadsheets as well as the HTML files generated with your code. Please note, I have just added one statement to save the result in spreadsheet format as well. As per my understanding of the scenario, the HTML result should match with the spreadsheet. Please confirm, if that would be your desired results.

Yes. Your understanding is right. I have seen the spreadsheet outputs as well and expectation is that it should match with that of the html output.


Hi Neeraj,

Thank you for the confirmation. I have raised these incidents in our bug tracking system for the product team’s review. We require some time for the proper analysis. As soon as we have the analysis results, we will be in a position to share the ETA for the fix.

Please find below the ticket details for future reference.

  • CELLSJAVA-42162: Data loss for the range BWY_LandscapeTable2.
  • CELLSJAVA-42164: Data loss for the range TestLandscape.
  • CELLSJAVA-42165: Data loss for the range NewTestForMichele.


This is to inform you that we have fixed your all three issues (CELLSJAVA-42162, CELLSJAVA-42164, CELLSJAVA-42165). We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Thank you.

Thanks for using Aspose.Cells.

Please download and try the following latest fix: Aspose.Cells for Java v17.1.4 and let us know your feedback.

It fixes the following issue

  • CELLSJAVA-42162 - Data loss while copying range with hidden rows & columns to new workbook and converting it to HTML
  • CELLSJAVA-42164 - Data loss while copying range with hidden rows & columns to new workbook and converting it to HTML
  • CELLSJAVA-42165 - Data loss while copying range with hidden rows & columns to new workbook and converting it to HTML

The issues you have found earlier (filed as CELLSJAVA-42165;CELLSJAVA-42164;CELLSJAVA-42162) have been fixed in Aspose.Cells for Java 17.2.0.

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