分类

XLSX 打印设置打包器

一键设置纸张、边距、缩放、重复标题行和页眉页脚

适合发票、报表和导出模板的统一打印配置,支持按工作表批量应用。

示例结果

1 个示例

批量设置打印版式

统一设置纸张、缩放、标题行与页眉页脚

xlsx-print-setup-pack-example1.xlsx 查看文件
查看输入参数
{ "workbookFile": "/public/samples/xlsx/finance-source.xlsx", "paperSize": "a4", "orientation": "landscape", "marginsJson": "{\n \"top\": 0.5,\n \"bottom\": 0.45,\n \"left\": 0.3,\n \"right\": 0.3,\n \"header\": 0.2,\n \"footer\": 0.2\n}", "fitToWidth": 1, "fitToHeight": 0, "repeatTitleRows": "1:2", "headerText": "&LFinance Pack&CQ1 Summary&RPage &P of &N", "footerText": "&LInternal Use Only&R&D" }

Click to upload file or drag and drop file here

Maximum file size: 200MB Supported formats: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel

API 文档

请求端点

POST /zh/api/tools/xlsx-print-setup-pack

请求参数

参数名 类型 必填 描述
workbookFile file (需要先上传) -
sheetNames text -
paperSize select -
orientation select -
marginsJson textarea -
scalePercent number -
fitToWidth number -
fitToHeight number -
repeatTitleRows text -
repeatTitleColumns text -
printArea text -
headerText text -
footerText text -
horizontalCentered checkbox -
verticalCentered checkbox -
showGridLines checkbox -

文件类型参数需要先通过 POST /upload/xlsx-print-setup-pack 上传获取 filePath,然后将 filePath 传递给对应的文件字段。

响应格式

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
文件: 文件

AI MCP 文档

将此工具添加到您的 MCP 服务器配置中:

{
  "mcpServers": {
    "elysiatools-xlsx-print-setup-pack": {
      "name": "xlsx-print-setup-pack",
      "description": "一键设置纸张、边距、缩放、重复标题行和页眉页脚",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=xlsx-print-setup-pack",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

你可以串联多个工具,比如:`https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`,最多20个。

支持 URL 文件链接或 Base64 编码作为文件参数。

如果遇见问题,请联系我们:[email protected]