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": []
    }
]
相关推荐
办公解码器3 小时前
Excel怎么检测录入身份信息的准确性?
excel
二进制星轨4 小时前
在 Ubuntu 上快速配置 Node.js 环境(附问题说明)
linux·ubuntu·node.js
黄毛火烧雪下4 小时前
Node.js 自动替换脚本工具:一键完成多项目批量修改与资源替换
node.js·ci
CodeCraft Studio4 小时前
国产化Excel处理控件Spire.XLS教程:如何使用 Java 将 TXT 文本转换为 Excel 表格
java·word·excel·spire·文档格式转换·txt转excel
kuxku5 小时前
使用 SSE 与 Streamdown 实现 Markdown 流式渲染
前端·javascript·node.js
测试老哥20 小时前
python+requests+excel 接口测试
自动化测试·软件测试·python·测试工具·测试用例·excel·接口测试
书中自有妍如玉21 小时前
Node.Js Express Sqlite3 接口开发
node.js·express
三十_A21 小时前
【无标题】
前端·后端·node.js
书中自有妍如玉21 小时前
Node.Js 实现模板生成Word、Word转Pdf文件、Excel生成、上传和下载
pdf·node.js·word