Extra rows appearing in HTML output

I am using Aspose Cells 8.3.0 and generating html output of selected range. It gives me extra rows in the html output. The range B6:C12 has 7 rows but it gives me 8 rows.

If I create the html output of the same range from the Excel, it runs fine and gives correct number of rows.
For your reference I have also attached the source excel file, html generated using Aspose and html generated from within the Excel.

It seems problem occurs when Data Tables are used.

Kindly, treat this is on urgent basis as the issue is being faced by the customer in the production environment. Its not matter of only extra rows being inserted but that extra row also contain incorrect colspan which spoils the complete structure of the data.

Following is code snippet being used:
Workbook workbook = new Workbook("C:/temp/rows_mismatch.xlsx");
com.aspose.cells.Worksheet selectedWorksheet = workbook.getWorksheets().get("Sheet1");

//Create Range
Range sourceRange = selectedWorksheet.getCells().createRange("B6:C12");

Workbook targetWorkbook = new Workbook(FileFormatType.XLSX);
WorksheetCollection targetWsc = targetWorkbook.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();
options.setPasteType(PasteType.ALL);

targetRange.copy(sourceRange, options);

File htmlFile = new File("C:/temp/RowsMismatch-Aspose-Generated.htm");
targetWorkbook.save(htmlFile.getAbsolutePath(), SaveFormat.HTML);

Hi Neeraj,


Thank you for contacting Aspose support.

We have evaluated your presented scenario while using the latest version of Aspose.Cells for Java 8.3.1.2 and your provided code snippet. We are able to observe the problem of empty row being inserted at the end of the pasted range while rendering the result in HTML format. The problem has been logged in our bug tracking system under the ticket CELLSJAVA-41154 for further investigation. You have to spare us little time to properly analyze the scenario, and to isolate the problem cause. In the meanwhile, we will keep you posted with updates in this regard.

Hi,

Thanks for using Aspose.Cells for Java.

We have fixed this issue.

Please download and try this fix: Aspose.Cells for Java v8.3.1.5 and let us know your feedback.

Hi,


Thanks very much for the fix. It works fine with Aspose Cells 8.3.1.5

Thanks,
Neeraj

Hi,


Thanks for your feedback.

Good to know that your issue is sorted out by the new fix/version, we have closed your ticket now. Feel free to write back if you have further comments or questions, we will be happy to assist you soon.

Thank you.

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


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