abp
abp copied to clipboard
DataTemplating feature
Hi,
You have TextTemplating mechanism and this is very nice feature but this can be more generic. My scenario: I want to use TextTemplating pattern to generate Excel file or Word file.
If you rename Volo.Abp.TextTemplating.Core to Volo.Abp.DataTemplating.Core and change the ITemplateRenderer=>RenderAsync to return byte[] or Stream (not string), I can implement this interface and extend this feature to other file format.
Now I have create DataTemplating mechanism using the same pattern like TextTemplating to be more generic and I have implemented Excel Templating using Npoi and EPPlus and for Word I have implemented Templating using DocX and It can be also implemented using Npoi Word. I use the same language syntax like scriban / https://mustache.github.io/
If you want I can share this code implementation with you. I wait for your feedback about this change/feature. Thanks
hi
return byte[] or Stream (not string), will be a breaking change, I will try to find a way.
@totpero That sounds great. Let me see it