Free Support Forum - aspose.com

Best Approach for Template Manipulation

We are reviewing the Template manipulation using Aspose.cells in java.We need to know how exactly we can make use of smartmarkers while feeding the data.

These are the questions we have right now

1)How to mix static Data and Dynamic Data in the template,for Eg:To:&=To(Here exactly To: will be static in the template and &=To will be dynamic variable value).

2)How to handle the multiple row values(for eg:1 row filled with Dynamic column Headers) and multiple data row values after the header.This will be like a table structure.

3)Is it possible to maintain the style and formatting that we keep in Header and Columns for the table in consequent rows.

4)How to make use of Javabean or a POJO.

5)Can we make use of AsposeDataTable

Eg:

1.Lets say i have the variable &=Header(List of dynamic headers)--Horizontal fashion

2.The row columns will be &=Columns(List of Columns data row 1..n)--Horizontal fashion and continuous till n.

Basically we need to copy the header style to all the dynamic headers same with rows too.The styles will be the same which is defined in the variable template.

Please give us some solid solutions to accomplish these features in a very efficient way.Also we would like to know whether this can be achieved entirely through smartmarkers otherwise we need to mix both markers and the worksheet cell replacement.

Thanks

Joe

Hi Joe,

1). Well, if you are using smart markers you have to abide by its syntax and options provided.

2). When you place a marker into the template file, certain sets of data (new rows are inserted and filled with data) would be inserted after the marker is processed based on the data source. So, if you have data in the template file under the marker header, it would be retained as under.

3) Normally, new blank rows are inserted and then filled with data based on the smart marker's data source. I think you may format data / style formattings after the data is filled into the cells in the sheet. Alternatively, you may try to apply conditional formattings on the cells having markers, so you may format the cells according to your requirement based on the values.

4). You may use bean parameter for your need.

I think in short you can do your tasks using bit of both: i.e., using Aspose.Cells smart markers feature and Aspose.Cells workheet, cells manipulation / formattings and formula calculation features etc.

For your reference, kindly check:

http://www.aspose.com/Wiki/default.aspx/Aspose.Cells/SmartMarker.html

Thank you.

Yes i am following the syntax and options of the smart markers.Right now the issue is loading the data from a collection for example a table grid.We are actually doing a proof on concept to know better.

1)How to populate array of data with multiple rows(In our case headers and data are dynamic)

2)Example:

&=$Headers(Header row-1-Single Object[])

&=$Columns(Data Row-Multiple Object[])

This is the Template structure i have currently.Let me know how to load the data for the Columns especially for the rows.

Also it will be helpful if u attach some example for AsposeDataTable and Pojo structures for data population

I have tried out the bean option but it could be used only when we have static columns defined.How to use the same for array or list of data with a bean variable.

Thanks

Joe

How to include a Collection or List apart from Resultset with smartmarkers.

Could anyone give an highlight on how to achieve this using smartmarkers.

Regards
Joe

Hi Joe,

Please check the demos in <A href="</A>.</P> <P>We have list all features about smart marker in the smart marker demos.</P> <P>In console demo, please check createBySmart() method.</P> <P>In web demo, please check SmartMarkerServlet class.</P>