gpt4 book ai didi

xml - Excel XML : Formatting inline text

转载 作者:数据小太阳 更新时间:2023-10-29 02:08:28 26 4
gpt4 key购买 nike

我正在尝试将内联样式应用于 Excel 电子表格中的单元格,目的是在单个单元格中包含粗体、非粗体和不同颜色的文本。

我正在使用以下内容:

<Row>
<Cell ss:StyleID="s1">
<ss:Data ss:Type="String" xml:space="preserve" xlmns="http://www.w3.org/TR/REC-html40"><Font>Black text</Font><B>Bold text</B><Font html:Color="#FF0000">Red text</Font></ss:Data>
</Cell>
</Row>

不幸的是,这似乎没有任何效果。当我在 Excel 中打开时,我的文本显示为全黑且非粗体。

我相信我完全被难住了<Font html:Color="#FF0000">Red text</Font><B>Bold text</B>成为要使用的正确元素。

这是我的完整 XML:

<?xml version="1.0" encoding="utf-8"?><?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>John</Author>
<LastAuthor>Smith</LastAuthor>
<LastPrinted>2013-11-13T12:16:09Z</LastPrinted>
<Created>2011-10-05T11:29:15Z</Created>
<LastSaved>2014-02-03T15:36:18Z</LastSaved>
<Company>Microsoft</Company>
<Version>14.00</Version>
</DocumentProperties>
<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">
<AllowPNG/>
</OfficeDocumentSettings>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>9096</WindowHeight>
<WindowWidth>22980</WindowWidth>
<WindowTopX>0</WindowTopX>
<WindowTopY>252</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>

<Styles>
<Style xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" ss:ID="s1">
<Alignment ss:Vertical="Top" ss:WrapText="1"/>
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
</Borders>
<Font xmlns:x="urn:schemas-microsoft-com:office:excel" ss:FontName="Calibri" x:Family="Swiss" ss:Size="11"/>
</Style>
</Styles>

<Worksheet xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" ss:Name="PDA Printout">
<Table xmlns:x="urn:schemas-microsoft-com:office:excel">
<Column ss:Width="500"/>
<Row>
<Cell ss:StyleID="s1">
<ss:Data ss:Type="String" xml:space="preserve" xlmns="http://www.w3.org/TR/REC-html40"><Font>Black text</Font><B>Bold text</B><Font Color="#FF0000">Red text</Font></ss:Data>
</Cell>
</Row>
</Table>
</Worksheet>

</Workbook>

最佳答案

看来这是可能的。你刚刚打错了。 :)

xmlns也变xmlns

关于xml - Excel XML : Formatting inline text,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22201679/

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