sail-sail / Ejsexcel
Licence: other
nodejs excel template engine. node export excel
Stars: ✭ 621
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Ejsexcel
Jxls
Java library for creating Excel reports using Excel templates
Stars: ✭ 128 (-79.39%)
Mutual labels: excel, template-engine
Laracsv
A Laravel package to easily generate CSV files from Eloquent model
Stars: ✭ 583 (-6.12%)
Mutual labels: excel
Blade
🔪 A standalone version of Laravel's Blade templating engine for use outside of Laravel.
Stars: ✭ 542 (-12.72%)
Mutual labels: template-engine
Corexlsx
Excel spreadsheet (XLSX) format parser written in pure Swift
Stars: ✭ 481 (-22.54%)
Mutual labels: excel
J2html
Java to HTML generator. Enjoy typesafe HTML generation.
Stars: ✭ 604 (-2.74%)
Mutual labels: template-engine
Tabula
Tabula is a tool for liberating data tables trapped inside PDF files
Stars: ✭ 5,420 (+772.79%)
Mutual labels: excel
Grmustache.swift
Flexible Mustache templates for Swift
Stars: ✭ 538 (-13.37%)
Mutual labels: template-engine
Reogrid
Fast and powerful .NET spreadsheet component, support data format, freeze, outline, formula calculation, chart, script execution and etc. Compatible with Excel 2007 (.xlsx) format and working on .NET 3.5 (or client profile), WPF and Android platform.
Stars: ✭ 532 (-14.33%)
Mutual labels: excel
React Handsontable
React Data Grid with Spreadsheet Look & Feel. Official React wrapper for Handsontable.
Stars: ✭ 511 (-17.71%)
Mutual labels: excel
Carbone
Fast and simple report generator, from JSON to pdf, xslx, docx, odt...
Stars: ✭ 487 (-21.58%)
Mutual labels: template-engine
Stock analysis for quant
Different Types of Stock Analysis in Python, R, Matlab, Excel, Power BI
Stars: ✭ 525 (-15.46%)
Mutual labels: excel
Formula Parser
Javascript Library parsing Excel Formulas and more
Stars: ✭ 544 (-12.4%)
Mutual labels: excel
Latte
☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites.
Stars: ✭ 616 (-0.81%)
Mutual labels: template-engine
Sqlitebiter
A CLI tool to convert CSV / Excel / HTML / JSON / Jupyter Notebook / LDJSON / LTSV / Markdown / SQLite / SSV / TSV / Google-Sheets to a SQLite database file.
Stars: ✭ 601 (-3.22%)
Mutual labels: excel
ejsExcel
nodejs excel template engine. node export excel, ejsExcel
How to use?
npm install ejsexcel
How to test?
-
执行 test/test.bat
test/test.bat
-
test/test.xlsx 为完整示例 demo
-
e.g
const ejsexcel = require("ejsexcel"); const fs = require("fs"); const util = require("util"); const readFileAsync = util.promisify(fs.readFile); const writeFileAsync = util.promisify(fs.writeFile); (async function() { //获得Excel模板的buffer对象 const exlBuf = await readFileAsync("./test.xlsx"); //数据源 const data = []; //用数据源(对象)data渲染Excel模板 //cachePath 为编译缓存路径, 对于模板文件比较大的情况, 可显著提高运行效率, 绝对路径, 若不设置, 则无缓存 const exlBuf2 = await ejsexcel.renderExcel(exlBuf, data, { cachePath: __dirname+"/cache/" }); await writeFileAsync("./test2.xlsx", exlBuf2); console.log("生成test2.xlsx"); })();
Syntax
Syntax | Description |
---|---|
data | data 为内置对象, 数据源 |
<%forRow | 循环一行 |
<%# | 输出动态公式 |
<%~ | 输出数字类型格式 |
<%= | 输出字符串 |
<%forCell | 循环单元格 |
<%forRBegin | 循环多行 |
<%forCBegin | 循环多个单元格 |
<%hideSheet()%> | 隐藏所在工作表 |
<%showSheet()%> | 显示所在工作表 |
<%deleteSheet()%> | 删除所在工作表 |
<% %> | 内部可执行 任意 javascript,可以用 <%console.log(data)%> 打印临时变量到控制台,进行调试 |
Author
- Author: Sail, 辐毂
- QQ: 151263555
- QQ群: 470988427
- email: [email protected]
Templates
Result
加数据渲染之后,导出结果
捐赠鼓励支持此项目,支付宝扫描:
项目贡献人列表
- @Hello World ¥50
- @德爾文 ¥50
- @Explore® ¥50
- @向左转 ¥50
- @吴燕飞 ¥50
- @strive-ming ¥10
- @MR.P ¥16.66
- @不求来生 ¥6.60
- @羊刀 ¥6.66
- @Leo ¥8.88
- @不摇碧莲 ¥6.66
- @天涯海角 ¥10
- @刚刚好 ¥5
- @Aptenodytes forsteri ¥15
- @HHB ¥30
- @Original ¥88.88
- @半日 ¥10
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].