gpt4 book ai didi

javascript - ExcelJS Node : horizontalCentered & verticalCentered in page not working

转载 作者:行者123 更新时间:2023-12-03 11:21:02 29 4
gpt4 key购买 nike

请帮助我。

我的流量:

Using a file Tempate -> Code (Exceljs) -> output New file



模板文件:

enter image description here
页面居中:
  • 水平:检查
  • 垂直:检查

  • 源代码:
    worksheet.pageSetup.horizontalCentered = true 
    worksheet.pageSetup.verticalCentered = true

    但是文件输出:
  • 水平:取消选中
  • 垂直:取消选中
  • 最佳答案

    请告诉我这是否有效。

    // DO NOT SET ANOTHER pageSetup AFTER DECLARING THIS!

    var worksheet = workbook.addWorksheet('sheet', {
    pageSetup: {
    horizontalCentered: true,
    verticalCentered: true,
    paperSize: 9,
    orientation: 'portrait',
    margins: {
    left: 0.3149606, right: 0.3149606,
    top: 0.3543307, bottom: 0.3543307,
    header: 0.3149606, footer: 0.3149606
    }
    }
    })

    关于javascript - ExcelJS Node : horizontalCentered & verticalCentered in page not working,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59245459/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com