docs/docs/en/template-print/faq.md
Problem Description: In Excel templates, if a cell has no content or styling, it may be removed during rendering, causing missing cells in the final document.
Solutions:
Example:
In the Excel template, set a light gray background for all target cells and insert spaces in empty cells.
Problem Description: When using loop functionality to output tables, merged cells in the template may cause abnormal rendering results, such as lost merge effects or data misalignment.
Solutions:
Problem Description: In Excel templates, if there is other content (e.g., order summary, notes) below a loop area that dynamically grows based on data items (e.g., order details), during rendering, the loop-generated data rows will expand downward, directly overwriting or pushing down the static content below, causing format disorder and content overlap in the final document.
Solutions:
Example:
Wrong approach: Placing "Order Summary" information immediately below the looping "Order Details" table.
Correct approach 1 (Adjust layout): Move "Order Summary" information above the "Order Details" table, making the loop area the bottom element of the page.
Correct approach 2 (Reserve blank rows): Reserve many blank rows between "Order Details" and "Order Summary" to ensure loop content has enough expansion space.
Correct approach 3: Use Word templates.
Problem Description: During template rendering, the system displays error prompts, causing rendering failure.
Possible Causes:
Solutions:
Example:
Incorrect template:
Order ID: {d.orderId}
Order Date: {d.orderDate:format('YYYY/MM/DD')}
Total Amount: {d.totalAmount:format('0.00')}
Dataset:
{
"orderId": "A123456789",
"orderDate": "2025-01-01T10:00:00Z"
// Missing totalAmount field
}
Solution: Add the totalAmount field to the dataset or remove the reference to totalAmount from the template.