I found that if there is one nested table per worksheet, the suggested solution suggesting to use a range with name _CellsSmartMarkers and LineByLine set to false works.
I added a name _CellsSmartMarkers with refersTo value =Template!$A$11:$H$15
But there might be more than one such nested table in a single worksheet that might need us to turn off LineByLine processing. In Excel, we can define a name with comma-separated ranges to refer to multiple sections of the worksheet.
So I added a name _CellsSmartMarkers with refersTo value =Template!$A$11:$H$15,Template!$A$24:$H$28
But this did not work. The document generation failed with the error: Invalid row index.
Is it acceptable to use _CellsSmartMarkers to refer to multiple ranges?
Or it is restricted to refer to a single range in a worksheet.
Attaching the excel template and screenshot for the name range nested-tables-name-range.zip (204.3 KB).
Can you please clarify what error message you are receiving when trying to use multiple ranges with the name _CellsSmartMarkers? Additionally, could you provide more details about the structure of your Excel template?
Thank you for the provided resources. Multple references in a defined name make the process much more complicated. Anyways, we will investigate it and provide feedback soon.
@sagaofsilence.dev
At present, Aspose.Cells does not support setting multiple ranges for smartmarker.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-46279
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@sagaofsilence.dev
We can not process all smart markers in A1:H28 because same level smart markers are under different parent markers.
We have to process area by area as the following:
designer.setOnlyArea(true);//in designing…
wb.getWorksheets().get(0).getCells().createRange(“A25:H28”).setName(“_CellsSmartMarkers”);
designer.process(true);
wb.getWorksheets().get(0).getCells().createRange(“A2:H15”).setName(“_CellsSmartMarkers”);
designer.process(true);
Does it fit your need? If yes, we will start to add designer.setOnlyArea(true) and implement it.
Probably I will be able to use this idea of processing one area at a time. I will add dedicated name ranges in the input template and then if such name ranges are found, I will process one area at a time. I will get back to you if I can achieve it.
Is this idea of area-by-area processing documented in the official documentation of smart markers?
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.