Giter VIP home page Giter VIP logo

wordgeneratecode's Introduction

WordGenerateCode🏆

  • 本项目基于NPOI实现Word文档模板与实体类映射, 通过在Word(模板)中添加文本替换标签<s=className>$filedd$ 、或 #图片# 标签, 重新对word模板文档内容进行结构化、结合业务生成包含文本、动态自适应表格、图片的Word文档、高效生成复杂Word文档☺。

example🎈

  • 1.制作Word 模板
  • 2.结构化模板、声明模板语法
  • 3.调用api生成

标签 说明
<s=ClassName> 开始标记
$Filed$ 声明文本
< e > 结束标记
#PicName# 声明图片
<loop=SurfaceDiseaseList> 声明多行文本

组合示例:

  • <s=Company>$Pretty$< / e>

  • 3.调用实体类生成工具 即可生成相应实体类代码🚀 output-> Company.cs
-- public dynamic Pretty { get; set; }

  • 4.代码调用、结合业务调用AddEntity、AddDynamicData填充数据、 调用生成ExportWithDynamicList方法即可生成复杂文档。🚀
 NPOITemplateExtensions.AddEntity(BridgeConcent); // 添加实体
 NPOITemplateExtensions.AddEntity(BridgeMember);
 NPOITemplateExtensions.AddEntity(BridgeOverview); 
 NPOITemplateExtensions.AddDynamicData("SurfaceDiseaseList",SurfaceDiseaseList); // 添加动态数据实体
 NPOITemplateExtensions.ExportWithDynamicList(templateStreamFromOss) // 动态导出

  • Tips:可搭配OSS云存储使用、模板放在云端
  • OSS ☁ ->pull template🎫
  • -> Replace🚗
  • -> generate newWord 🎫
  • <- push file 🎫
  • -> dowload url 🎯

wordgeneratecode's People

Contributors

psc-f avatar

Watchers

 avatar

Forkers

gaozejie

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.