Cannot edit PivotTable in group edit mode

I experience something strange when I process my workbook with Aspose.Cells framework. When I open the file I got the following MsgBox error from Excel (2016) errorMsg.JPG (4.6 KB)
Which means that the Pivot cannot be edited because of Edit mode.

I am not able to provide the whole context since it is quite abstract, but I can tell that I ran some commands to copy a template workbook, copy and rename worksheets, to switch on/off sheet’s visibility, and create flat tables and pivot tables. I especially don’t do anything to explicitly group worksheets.

If you have any clue on what could cause such issue, please let me know. Thank you

@GVA32156,
If you can not provide the original file, you can use fake data simulation operations to reproduce the issue. Would you like to provide your sample file and executable Console project? We will check it soon.

The problem was on my side. I called this command in a loop for different sheets, so it created a group sheets :

sheet.setSelected(true);

And because I modify Pivot afterwards on the whole selection (which I don’t want), the Excel workbook ended up corrupted.
Thank you anyway.

@GVA32156,

Good to know that your issue is sorted out now. Feel free to contact us any time if you have further queries or comments, we will be happy to assist you soon.