How to insert smart markers dynamically to the workbook template in aspse.cells for java

Hi,


I have a scenario below. In a worksheet I have to dynamically populate markers and data using markers as shown below. Attached the workbook as well. Please advise how can we do this.

Markers
&=section1.name
&=section1.subsectionname
&=section2.name
&=section2.subsectionname
&=section3.name
&=section3.subsectionname
Expected output:
SectionName1
section1AccountFistdata
section1Accountseconddata
section1Accountthirddata
SectionName2
section2AccountFistdata
section1Accountseconddata
SectionName3
section3AccountFistdata

Please note that sectionnames and subsection names are dynamic and can be N number.
There can be section4.name and its subaccounts, it means we do not know how many sections I should display until run time based user input

Hi,


Well, you may try Aspose.Cells’ Smart markers Grouping Data feature but I am afraid, it might not give you 100% similar output as per your requirements as it has its own style and formatting which may not be changed. I have attached the updated template file for your reference, please check the Smart Markers (you got to change your markers accordingly) and the output that you may get with Smart Markers’ grouping data feature.

For complete reference on Smart Markers and its “Grouping Data” feature, please see the documents for your reference:
http://www.aspose.com/docs/display/cellsnet/Smart+Markers
http://www.aspose.com/docs/display/cellsjava/Smart+Markers

Note: You need to use latest version of Aspose.Cells for Java as it supports Grouping Data feature in Smart Markers.

Thank you.

Thanks Amjad,


I wanted section name in single line and subsections in nextline and all should be in the same column and I wanted the output exactly as I have outlined in the sample workbook. The solution does not fit my requirement.

In these scenarios, is there any other way that we can use instead of the markers and ICellDataTables? or should render manually using Aspose cells and loops in java?

Also, is there way I can insert the smart markers in the template at run time(from java) instead of specifying them in the template?

Hi,


Well, I am afraid, Aspose.Cells’ Smart markers Grouping data feature has its own attributes and specifications which might not suit your custom needs. I think you have to use manual approach for your task.

Regarding your other query (“insert the smart markers in the template file at runtime”), sure, you may input Markers in the new Workbook or an existing Workbook at runtime using Cell.putValue() method then create and set its data source to process it accordingly.

Thank you.