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

Free Support Forum - aspose.com

CopyRange and group rows feature

Hi. I have found some issue with grouped rows and copy range.


So, i have a book (in current Excel’s format and in old Excel’s format) with groupped rows. I need to copy vertical part of book to new columns, but after performing this action, my group become unexpandable.
@Test
public void testGroup() throws Exception {
Workbook wb = new Workbook(“D://group.xlsx”);

Range range = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 8, 548, 9);
Range source = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 7, 548, 7);

PasteOptions options = new PasteOptions();
options.setPasteType(PasteType.ALL);
range.copy(source, options);


wb.save(“D://out.xlsx”);



wb = new Workbook(“D://group.xls”);

range = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 8, 548, 9);
source = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 7, 548, 7);

range.copy(source, options);

wb.save(“D://out.xls”);

}
I have used a 8.7.2 version of library.

Best regards. Alexey

Hi,


Thanks for providing us template files and sample code.

Please try our latest version/fix: Aspose.Cells for Java (Latest Version). I have tested your scenario using v8.7.2.1 with your provided code and found an issue but not exactly the same as yours. In the output XLS file, grouped node ("+") is expandable in the worksheet “Сводка” but the contents are not showing fine. Could you confirm the issue with v8.7.2.1, so we could log a ticket for it into our database for a fix.

Thank you.

Hi. I perform test with new library and saw that issue the same, as for previous version. Excuse me - i have attached wrong file (out.xlsx) and not attached “group.xlsx”.


Issue:
1) For “XLS” files after copy range action, all rows of group became very tall.
2) For “XLSX” files after copy range action, group became unexpandable (click by plus not perform some action. Icon not chaged to minus)

I have attached source files and out files. Please check it.

Best regards. Alexey

Hi,

Thanks for providing further details and complete set of template files.

  1. After an initial test, I observed this issue as you mentioned. I found an issue with grouped rows when copying ranges in XLS file as you have mentioned. I have tested the issue with your provided code and template XLS file. In the output XLS file, the grouped node ("+") is expandable in the worksheet “Сводка” but the contents are not showing fine and have become very tall.

I have logged a ticket with an id “CELLSJAVA-41806” for the issue. We will look into it soon.

e.g

Sample code:

Workbook wb = new Workbook(“D://group.xls”); 

Range range = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 8, 548, 9); 
Range source = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 7, 548, 7); 

PasteOptions options = new PasteOptions(); 
options.setPasteType(PasteType.ALL); 
range.copy(source, options); 

wb.save(“D://out.xls”); 
  1. I also observed this issue as you mentioned for XLSX file. I have tested the issue with your provided code and template XLSX file. In the output XLSX file, the grouped node ("+") is not expandable anymore in the worksheet “Сводка”

I have logged a ticket with an id “CELLSJAVA-41807” for the issue. We will look into it as well soon.

e.g

Sample code:

Workbook wb = new Workbook(“D://group.xlsx”); 

Range range = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 8, 548, 9); 
Range source = wb.getWorksheets().get(“Сводка”).getCells().createRange(0, 7, 548, 7); 

PasteOptions options = new PasteOptions(); 
options.setPasteType(PasteType.ALL); 
range.copy(source, options); 

wb.save(“D://out.xlsx”); 

Once we have any update on any of the above mentioned issues, we will let you know here.

Thank you.

Hi,


This is to inform you that we have fixed your issues logged earlier as “CELLSJAVA-41806” and “CELLSJAVA-41807”.
We will soon provide the fix after performing QA and including other enhancements
and fixes.

Thank you.

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


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