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": []
    }
]
相关推荐
123的故事38 分钟前
工具分享(7)-多Excel文件内容查询工具
c#·excel·实用工具
zhuxiaojt2 小时前
npx 为何如此之慢?浅谈 npx 速度慢的原因及工具推荐
node.js
码农刚子3 小时前
从零开始:在 Windows 服务器上部署 Node.js 项目(小白实战教程)
后端·node.js
hikktn4 小时前
Excel 导出 OOM 预防实战:30 万行从堆溢出到 50MB 的演进
java·excel·easyexcel
MageGojo9 小时前
用 Node.js 把聚合 API 平台封装成零依赖命令行工具:registry 驱动的工程实践
node.js·restful·api接口·命令行工具·cli
濮水大叔11 小时前
浅论CabloyJS全栈框架提供的“两级页签”机制
typescript·node.js·next.js
meilindehuzi_a11 小时前
深入理解 Ajax 异步请求:从 XMLHttpRequest 到 Node.js HTTP 服务实践
http·ajax·node.js
SwJieJie11 小时前
Webpack vs Vite 构建工程化实战(Vue 项目深度解析)
前端·vue.js·webpack·node.js
yunceqing11 小时前
从Excel调度到TMS平台:物流软件开发避坑清单
大数据·前端·网络·人工智能·excel·推荐算法
什仙11 小时前
Mathcad Prime 对比 Excel/MATLAB/Mathematica:核心优势速览
excel