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": []
    }
]
相关推荐
小费的部落几秒前
Excel 在Sheet3中 匹配Sheet1的A列和Sheet2的A列并处理空内容
java·前端·excel
缺点内向1 小时前
如何在 C# 中重命名 Excel 工作表并设置标签颜色
开发语言·c#·excel
源去_云走1 小时前
自建 Iconfy API 服务:解决国内访问不稳定问题
前端·容器·npm·node.js
wtsolutions6 小时前
Sheet-to-Doc: Automate Document Generation with Excel Data and Word Templates
word·excel·wtsolutions
旧梦星轨6 小时前
掌握 Vite 环境配置:从 .env 文件到运行模式的完整实践
前端·前端框架·node.js·vue·react
wtsolutions7 小时前
Sheet-to-Doc:用Excel数据和Word模板自动生成文档
excel·wps·wtsolutions
程序猿ZhangSir7 小时前
将数据库数据导出为Excel文件,并针对性的对部分数据做脱敏加密,常用方法解析
excel
qq_348231858 小时前
面向初学者到进阶者的 Node.js 学习指南
node.js
大猫和小黄8 小时前
Windows 下使用 NVM 管理多个 Node.js 版本
windows·node.js
Chase_______8 小时前
【保姆级】Node.js 最新安装教程,附环境变量配置
node.js