We fixed some issues.
We processed smart markers row by row.
So in the worksheet “Misc2”, we only export one record to Range “A12:D13” because of “List #2 of Reporters” range. We can not know whether “List #2 of Reporters” range should be handled separately.
FYI Summary of the test template 25.4.4.xlsx you shared. image.png (18.2 KB)
Our document generation service is utilized across various domains, meaning users define their data models within templates according to their specific business requirements. We have limited control over this data modeling and report structure. Therefore, our approach focuses on educating users on best practices – highlighting what works effectively and what doesn’t – to empower them to make informed choices.
Our goal is to ensure predictable document generation, minimizing the need for users to rely on trial and error to achieve desired results. That’s why I’m reviewing the Aspose Cells documentation, particularly the examples and guidance on authoring templates when using nested object data structures.
We’ve encountered issues with a scenario involving two lists: list #1 (two directors) and list #2 (reporters associated with the first director – three reporters). Specifically, when using separate cell ranges for each table, an extra row is inserted into the second table. Ideally, the second table should only display the three reporters associated with the first director, without attempting to output reporters related to the second director.
Based on our experimentation, my understanding is the following:
To ensure tables or ranges are output independently, they should be defined in separate cell ranges.
To create a parent-child relationship where one table’s output depends on another, both tables should reside within the same cell range.
Could you confirm if this understanding is accurate? I would appreciate any advice you can offer on this scenario and would welcome any updates to the official documentation addressing these use cases.
@sagaofsilence.dev
a) If WorkbookDesigner.LineByLine is true (default)
We will process smart markers row by row.
The only one director is output because we can not know whether list #1 and list #2 in the worksheet ”Template17“ are independent because they are in the same row.
So if the ranges are independent, please do not put them in the same line.
b) If WorkbookDesigner.LineByLine is false
We will process all smart markers together in the defined named range “_CellsSmartMarkers”, then you can nested layout your markers in two rows of defined named range “_CellsSmartMarkers” as :
&=RootData.Directors.FirstName &=RootData.Directors.MiddleName
&=RootData.Directors.Reportees.id &=RootData.Directors.Reportees.FirstName
If there is no defined named range “_CellsSmartMarkers”, we can know which smart marker should be processed together.
Thanks a bunch for the detailed explanation of how Aspose handles nested and related tables using the “_CellSmartMarkers” range and the impact of the LineByLine flag!
To better understand the inner workings and advise users effectively, I’m diving into the Aspose mechanism. My goal is to document and provide clear examples that guide users on when to leverage custom ranges and flags like LineByLine.
For instance, we could explore a naming convention such as “DEMO_01_1” (range with LineByLine = true) and “DEMO_02_2” (range with LineByLine = false).
Given that tables are often positioned side-by-side with related, but not necessarily parent-child, data, understanding how “_CellsSmartMarkers” ranges dictate processing is crucial.
I want to clarify:
When to use Custom Ranges: Scenarios that benefit from specific range definitions.
When to use Flags (LineByLine): How the LineByLine flag affects processing based on data relationships.
When to use Default Processing: Situations where default Aspose processing is sufficient without custom ranges.
By clarifying these points with documented examples, users can make more informed decisions about how to handle their specific table configurations.
@sagaofsilence.dev
If nested smart markers layout on several rows as the following: image.png (16.8 KB)
You have to set the defined named range “_CellsSmartMarkers” (A1:H13) which includes all markers and set LineByLine = false, then we can know how many rows should be processed together.
If you only layout smart markers on a row, you do not need to think about whether the source is nested.
While the engine successfully processes multiple tables when positioned in different rows, utilizing the _CellsSmartMarkers named range and the LineByLine=false option, a significant issue occurs when tables are located side-by-side on the same row – a common user scenario.
When we processed it without _CellsSmartMarkers and default LineByLine options (LineByLine=true ), the engine only outputs the first (leftmost) table on that row, ignoring others. Even the leftmost table is not output correctly.
This issue is demonstrated in the ‘Template17’ worksheet of the attached Excel output file. out_employees-001-true.zip (57.0 KB)
Thanks for providing template Excel file, demo (sample code) and JSON data file.
I tested using your template Excel file, JSON data and sample code. I confirmed your mentioned issue(s). I have logged the test-case with your existing ticket “CELLSJAVA-46356” into our database. We will look into it soon.
We only processed the worksheet “Tempate17”. But now if LineByLine is false, we do not support shift the range ,we only insert rows. So processing “List #2" reports, some empty rows were inserted into the “List #1” reports. We will try to support “Shift” smart marker when LineByLine is false, but it will be more harder to layout.
As I said in the previous post, please do not layout smart markers of two reports in one row, they will be processed together or interact.
Your diligent investigation of alternative solutions is greatly appreciated.
However, considering the importance of format and data integrity for controlled business documents, generating Excel file outputs is essential. These files are often utilized as proposals to clients, reports to executive management, and compliance documents.
Therefore, it is imperative that we support the designated input Excel templates and output Excel report formats as required by the business.
Please check the result with shift tag.
But List #3 and List #4 are not in the same line because the shift count of List #1 and List #2 are different.
2,We also hope that the output is consistent with your expectations.
But everyone’s expectations may be different, for example, some people expect smart makers on one line to be processed together, while you think that separated by spaces are independent reports
3, We process from top to bottom, otherwise we would need to move a large amount of data.
Thank you for your efforts in generating the Excel report from the JSON input and Excel template. While the report is appreciated, the outcome, unfortunately, doesn’t align with the expected results, and I’ve attached a screenshot of worksheet #17 with comments to highlight the specific issues. formatting issues - 12-may-2025.png (44.7 KB)
I appreciate you pinpointing that user expectations can vary, especially concerning how “smart markers” are processed.
As our service is a multi-tenant SAAS application, template and outcome expectations differ from tenant to tenant. We aim to empower our tenants by providing them with the flexibility to design templates according to their specific needs. To achieve this, our document generation service needs to be adaptable enough to accommodate diverse template designs.
Effectively, we need to relay user intentions to the document generation engine, as tenants understand which tables should be processed together versus independently; the engine shouldn’t have to guess. Currently, we’re limited to using the “_CellsSmartMarkers” custom range name and the “LineByLine” option to define tabular data, lacking a way to specify whether multiple tables should be processed together.
I am interested in your thoughts on this: If users could indicate how tables should be processed together, would that simplify the task for the Aspose engine?
The two issues are caused by we would insert rows when processing smart markers without "Shift“ tag. The above attached file is generated by 25.5 with “Shift” tag.
2,[quote=“sagaofsilence.dev, post:31, topic:307996”]
lacking a way to specify whether multiple tables should be processed together
[/quote]
You can use “_CellsSmartMarkers” to include multiple adjacent tables which should be processed together.
About independently processing, I think we can add a tag(such as range ) to indicates whether we should process a range or a row. If “range” tag is set, we will end a table with empty cells, then we can know process your excepted table independently.
Thanks for the shift tag example. While it helps with formatting and data, it doesn’t quite achieve the desired table layout, as the tables are vertically shifted by one row. The “range” tag you suggested seems like a promising solution. If it allows us to process tables on the same row independently, we could achieve the desired side-by-side arrangement for the user. Is the “range” tag currently implemented in version 25.5? If not, when can we expect its availability?
No, current version (Aspose.Cells v25.5) does not support “range” tag. We already logged the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in support policies.
Issue ID(s): CELLSJAVA-46389 - Support smart marker range tag.
We will try to implement the feature soon. Once we have an update on it, we will let you know here.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.