abp icon indicating copy to clipboard operation
abp copied to clipboard

DataTemplating feature

Open totpero opened this issue 3 years ago • 2 comments

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

totpero avatar Jul 08 '22 08:07 totpero

hi

return byte[] or Stream (not string), will be a breaking change, I will try to find a way.

maliming avatar Jul 08 '22 08:07 maliming

@totpero That sounds great. Let me see it

XuJin186 avatar Aug 11 '22 03:08 XuJin186