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

Free Support Forum - aspose.com

Excel subtotal error and dynamic formula use copystyle error

Hi,
I’m having some problems with smart markers。
In aspose-cells-20.9, Excel Subtotal ranges follow smart markers,
but In aspose-cells-22.5, the logic has changed.
template:
image.png (8.1 KB)
res:
image.png (7.8 KB)

Another problem is that when I use the copystyle parameter after the dynamic formula, the calculation throws an error. Otherwise, it won’t.
image.png (64.9 KB)

Enclosed is my code:
AsposeTest.zip (1016.5 KB)

TestSmartMarkers.xlsx is a template for Subtotal problem
TestSmartMarkers1.xlsx is a template for copystyle problem

@lemonfight,

Thanks for the template file and sample.

I tried your exact code with your template Excel file (“TestSmartMarkers1.xlsx”) and found the output files (Excel file and HTML file) have no data in them on my end. May be it is due to your code segment or template file. I am using our latest version/fix: Aspose.Cells for Java 22.6 Download | Maven. Could you please try our latest version/fix: Aspose.Cells for Java v22.6 and let us know your feedback with resultant files. We will check it soon.

1 Like

22.6 version still has these error.
1.subtotal ranges are not following smart markers.(template Excel file “TestSmartMarkers.xlsx”)
image.png (113.9 KB)

2.Add the copystyle parameter to the dynamic formula of the coordinate L4 of the TestSmartMarkers1.xlsx,
then the calculation will report an error. It can be calculated normally without the copystyle parameter.

@lemonfight,

  1. Could you please update the formula as following:
    =SUBTOTAL(9,D1:D1)

Let us know if you still find the issue.

1 Like

It works as you said :+1:

Please check my template “TestSmartMarkers1.xlsx” the dynamic formula in the lower right corner will report an error using the copystyle parameter.
AsposeTest.zip (964.0 KB)

@lemonfight,

Where you read that “copystyle” attribute can be used in dynamic formula marker? I do not think this can be used in dynamic formula marker.