nodered 下载 excel 文件

这种方案并不好,因为不便于管理,如果只是单纯的测试或者临时使用,还是不错的

推荐写一个 python 服务专门来写接口比较好,方便统一管理

javascript 复制代码
[
    {
        "id": "b2265f7377b8e823",
        "type": "group",
        "z": "d375f8470116140e",
        "name": "报告文件下载",
        "style": {
            "label": true
        },
        "nodes": [
            "bbc309c20b6620b1",
            "90f2088cd93f3b1e",
            "0f26e2df2b99e308",
            "5de3d93d41a7d55d"
        ],
        "x": 234,
        "y": 539,
        "w": 712,
        "h": 82
    },
    {
        "id": "bbc309c20b6620b1",
        "type": "http in",
        "z": "d375f8470116140e",
        "g": "b2265f7377b8e823",
        "name": "",
        "url": "/excel",
        "method": "get",
        "upload": false,
        "swaggerDoc": "",
        "x": 320,
        "y": 580,
        "wires": [
            [
                "90f2088cd93f3b1e"
            ]
        ]
    },
    {
        "id": "90f2088cd93f3b1e",
        "type": "file in",
        "z": "d375f8470116140e",
        "g": "b2265f7377b8e823",
        "name": "",
        "filename": "payload.path",
        "filenameType": "msg",
        "format": "",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 480,
        "y": 580,
        "wires": [
            [
                "0f26e2df2b99e308"
            ]
        ]
    },
    {
        "id": "0f26e2df2b99e308",
        "type": "function",
        "z": "d375f8470116140e",
        "g": "b2265f7377b8e823",
        "name": "set response headers",
        "func": "msg.headers = {\n    'Content-Disposition': 'attachment; filename=\"output.xlsx\"',\n    'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n};\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 680,
        "y": 580,
        "wires": [
            [
                "5de3d93d41a7d55d"
            ]
        ]
    },
    {
        "id": "5de3d93d41a7d55d",
        "type": "http response",
        "z": "d375f8470116140e",
        "g": "b2265f7377b8e823",
        "name": "",
        "statusCode": "",
        "headers": {},
        "x": 870,
        "y": 580,
        "wires": []
    }
]
相关推荐
濮水大叔6 小时前
NestJS Dynamic Providers 与 Cabloy/Vona Provider Scene:同接口多实现的两种装配哲学
typescript·node.js·nestjs
Sadie_d8 小时前
Excel管理研发项目有哪些问题?什么情况要升级项目管理系统?
excel·项目管理·研发管理
Metaphor69210 小时前
如何快速拆分超大 Excel 文件【Python 教程】
python·excel
工具派13 小时前
PDF里没有表格,PDF转Excel行列是靠什么对上的?
pdf·excel
silvamux_13 小时前
Node.js 调用大模型 API 排错实录
node.js
泡海椒15 小时前
JQuickExcel 大文件排障与调优:从实际路径定位 OOM、临时盘和慢任务
开发语言·数据库·缓存·oracle·excel
Data-Miner17 小时前
用 Excel 做「高级」数据统计分析的实操指南
excel
2501_9307077817 小时前
使用C#代码设置 Excel 单元格的数字格式
excel
Amumu1213817 小时前
NodeJs介绍
前端·node.js
孟陬18 小时前
利用 TypeScript `asserts` function 语法定制一个类型缩窄的 `assertIncludes`
typescript·node.js