gpt4 book ai didi

xml - 控制 Excel XML 中的打印预览默认值

转载 作者:行者123 更新时间:2023-12-04 22:04:41 25 4
gpt4 key购买 nike

使用 Excel XML 和嵌入式样式表,您可以控制电子表格外观的许多方面。

有没有办法控制打印预览页面上的默认值?具体来说,我想将页面大小设置为 1 页 x 1 页。

最佳答案

在 SpreadsheetML (Excel 2003 XML) 中,FitToPage 是 WorksheetOptions 元素中的一个元素。它还取决于那里的 Print 元素中的元素 FitWidth 和 FitHeight。

例子:

    <?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
...
<Worksheet ss:Name="Tabelle1">
<Table>
<Row>
<Cell><Data ss:Type="Number">123</Data></Cell>
...
</Row>
...
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<FitToPage/>
<Print>
<FitWidth>1</FitWidth>
<FitHeight>1</FitHeight>
</Print>
</WorksheetOptions>
</Worksheet>
</Workbook>

问候

阿克塞尔

关于xml - 控制 Excel XML 中的打印预览默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26363602/

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