【问题标题】:How to create opendocument ods files with optimal row height如何创建具有最佳行高的 opendocument ods 文件
【发布时间】:2016-11-12 19:42:18
【问题描述】:

应用程序在代码中创建 OpenDocument 电子表格(ods 文件)。 有些行包含更大字体的标题。 如果在 LibreOffice 中打开,它们只会部分可见。

所有行都有相同的样式 ro1 具有 style:use-optimal-row-height="true" 设置:

    <style:style style:name="ro1" style:family="table-row">
   <style:table-row-properties style:use-optimal-row-height="true" fo:break-before="auto"/>
    </style:style>

此设置不会增加标题行高度。所有行具有相同的高度。 如何强制 Libreoffice Calc 和 Excel 为打开的表格上的标题行选择最佳高度?
在文件创建过程中,很难手动计算行高。

【问题讨论】:

    标签: excel libreoffice-calc ods opendocument


    【解决方案1】:

    根据this bug report,这是 LibreOffice 编码人员有意的设计选择,听起来行为可能不会改变。因此,除了在文件创建期间计算行高之外,可能的解决方案是:

    1. 使用 Apache OpenOffice,它会在打开文件时重新计算行。
    2. 编写一个 LibreOffice 宏来重新计算行。宏可以作为生成过程的一部分自动运行,在文件打开时自动运行,或者使用热键或按钮手动运行。

    这里有一个类似的问题:https://ask.libreoffice.org/en/question/81629/how-to-apply-optimal-row-and-column-width-when-opening-a-calc-document/

    【讨论】:

    • 谢谢。同样,use-optimal-column-width="true" 值在 Excel 和 LibreOffice 中都会被忽略。它在 Excel 和 LibrveOffice 中是否也像 LO 中的最佳行高一样未实现?
    猜你喜欢
    • 1970-01-01
    • 2011-02-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多