Free Support Forum -

Aspose smart markers - limit data

Hi Team,

Assume I have a list of data eg: List data; which holds my full data with nearly 300+ data.

Coming to the template, we have configured the same data with smart markers in multiple places like

& [Which populates 300+ rows]
& [which populates 300+rows]

There are more sheets and in many places, we have used the same data. Now the question, is there is some way to limit the data that is populated to the template? Say, I want to populate only 20?
Since smart markers have declarative ways of handling things, is there an option to do this from template instead of slicing and making the list for each data source which is bad for both code & template.


Thanks for your query.

See the document with example code that will help you accomplish the task for your reference:

Hope, this helps a bit.

@Amjad_Sahi: I was looking to control the data populated in a template itself. Let’s say I have 100 data in the list. I want the template to render only the first 20 data. We are using Java aspose cells.

  1. From template, possible pass integer 10 to control data flow?

  2. Tried below line from code itself, syntax error.
    objectDesigner.setDataSource(“tableList”,tableList, 10);

Since we are publishing the same data in more places, we are trying for a solution that controls the data populated in the template in the template itself or at the objectDesigner place.

Any idea?


See the document with simple example using Aspose.Cells for Java for your reference:

If you still find any issue, kindly do create a standalone console Java program (runnable) using latest version/fix: Aspose.Cells for Java v20.4.x to reproduce the issue/exception, we will check it soon. Also zip your template file(if any) and attach it. This will help us really to evaluate your issue precisely to consequently figure it out soon.