欢迎回来

登录 EAKE AI,继续您的智能之旅

忘记密码?
还没有账号?立即注册

报告生成器 — 数据报告

2026-07-23 · 未分类

报告生成器 — 数据报告

从数据自动生成结构化报告。支持多种模板(周报/月报/分析报告),输出 Markdown 或 HTML 格式。

report-generator

![Build Status](https://travis-ci.org/nathan-boyd/report-generator) ![Coverage Status](https://coveralls.io/r/nathan-boyd/report-generator?branch=master)

![Sauce Test Status](https://saucelabs.com/u/nathan-boyd)

report-generator encapsulates the task of creating simple html reports.

##quick example


    var reportGenerator = require('report-generator');

    var generator new reportGenerator('report.html', ['col1', 'col2'], function (err) {
        assert(err === null);
    });

    // write a simple row
    generator.writeRow(['cell1', 'cell2'], function (err) {
        assert(err === null);
    });
    
    // write a row using a cell object, with color support
    var cells = [
        {cellContent: '1', color: "red"},
        {cellContent: '2', color: "red"}
    ];

    var row = [cells];

    generator.writeRows(row, function (err) {
        assert(err === null);
        done();
    });

    generator.closeReport(function(err){
        assert(err === null);
    });

安装

# 安装到当前项目
npx skills add report-generator

# 全局安装
npx skills add report-generator -g

来源

评论区

该文章暂未开放评论功能。