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 小时前
Excel - MS Support for Excel: 2 Collaborate
数据库·windows·excel
程序员爱钓鱼11 小时前
Node.js 编程实战:测试与调试 —— Mocha / Jest / Supertest 使用指南
前端·后端·node.js
冴羽13 小时前
JavaScript Date 语法要过时了!以后用这个替代!
前端·javascript·node.js
LingRannn14 小时前
【vim 中如何替换】
编辑器·vim·excel
张洪权14 小时前
node fs 模块核心 api
node.js
天远数科15 小时前
Node.js全栈实战:构建基于天远多头借贷行业风险版API的BFF风控层
大数据·node.js
yesyesido15 小时前
智能文件格式转换器:文本/Excel与CSV无缝互转的在线工具
开发语言·python·excel
_Kayo_16 小时前
Node.js 学习笔记6
笔记·学习·node.js
winfredzhang16 小时前
[实战] Node.js + DeepSeek 打造智能档案归档系统:从混乱到有序的自动化之旅
css·node.js·js·deepseek api
亮子AI16 小时前
【Node.js】为什么数据库连接总是中断?
数据库·node.js