abpframework / abpframework/abp

DataTemplating feature

Open
#13,277 2 comments 3 reactions 1 assignee View on GitHub

@maliming is already working on this.

Since Jul 11, 2022.

Dominant language
C#
Stars
14.4k
Forks
3.7k
Avg merge
15h 32m
Merged PRs (30d)
106

Description

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 created 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.