Magicodes.IE.Excel uses a double-brace {{ }} syntax within Excel templates to perform data rendering.
Cell Rendering
Use {{PropertyName}} to render simple properties. Supports sub-object properties and is case-sensitive.
Image Rendering
Images can be rendered using the Image:: prefix. Supported formats include:
{{Image::ImageUrl?Width=50&Height=120&Alt=404}}{{Image::ImageUrl?w=50&h=120&Alt=404}}{{Image::ImageUrl?Alt=404}}{{Image::ImgUrl?w=50&h=50&XOffset=100&YOffset=100}}
Table Rendering
To render a list of items as a table, you must define a start and end marker:
- Start Marker:
{{Table>>ListName|RowNo}} where ListName is the property name of the list in your DTO and RowNo is a field within the list items. - End Marker:
{{Remark|>>Table}} (The field name before the pipe is arbitrary, but the |>>Table suffix is required). - Row Fields: Inside the table area, use
{{PropertyName}} to map fields from the list items.
Note: Currently, multiple tables per row are not supported.