Slicer Not Moving when you insert rows

When inserting rows in a existing spread sheet with a slicer the slicer does not move down but stays in the same position. Properties for the slicer are set to (Move but don’t resize)
This seems to be a bug in the software as when doing it manually in excel the slicer moves. All other objects are move down correctly when inserting rows.

@dabatec

Thanks for using Aspose APIs.

Please provide us your sample Excel file containing the Slicer. You can either provide us your original Excel file or you can create one manually using Microsoft Excel. Please also provide us your sample code. We will execute your code and replicate the issue at our end and log it in our database for investigation and for a fix.

Hi

File is attached and the code is below.

            Dim strTemplate as string

            Dim strCopyFile as string

            strTemplate = "c:\ExcelTemplates\GenericReportCpt.xlsx"

           strCopyFile = "c:\ExcelTempFiles\GenericReportCptOutPut.xlsx"

           System.IO.File.Copy(strTemplate, strCopyFile, True)

            Dim License As Aspose.Cells.License = New Aspose.Cells.License()
            License.SetLicense("Aspose.Cells.lic")

           Dim workbook As Workbook = New Workbook(strCopyFile)
      
           Dim sheetOverview As Worksheet = workbook.Worksheets("Overview")

            sheetOverview.Cells.InsertRows(47, 10)

            workbook.Save(strCopyFile)

           workbook.Dispose()

ThanksGenericReportCpt.zip (1.3 MB)

Peter

@dabatec,

Thanks for providing us template file and sample code.

After an initial test, I am able to observe the issue as you mentioned by using your sample code with your template file. I found that slicer is not moving down in the sheet when inserting rows:
e.g
Sample code:

[C#]
Workbook workbook = new Workbook(“e:\test2\GenericReportCpt.xlsx”);
Worksheet sheetOverview = workbook.Worksheets[“Overview”];
sheetOverview.Cells.InsertRows(47, 10);
workbook.Save(“e:\test2\out1.xlsx”);

I have logged a ticket with an id “CELLSNET-45696” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@dabatec

Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSNET-45696 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

@dabatec,

Please try our latest fix/version: Aspose.Cells for .NET v17.9.7

Your issue should be fixed in it.

Let us know your feedback.

Hi

This link is for .net 4.0. Do you have a link for .net 3.5.

Thanks
Peter

@dabatec

Please use the follwing fix. It is compiled in .NET 2.0, so it will work with .NET 3.5 as well.

The issues you have found earlier (filed as CELLSNET-45696) have been fixed in Aspose.Cells for .NET 17.10.

This is now working.
Thank you.

@dabatec

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest version. Let us know if you encounter any other issue, we will be glad to look into it and help you further.