OpenXML - 显示word文档内容时格式丢失 [英] OpenXML - Formatting lost when displaying contents of word document
问题描述
请参阅以下Word文档内容:
See below content from Word Document:
贷方报告市场中断的截止日期(条款 17.3 (市场
中断)):
见下文显示在asp.net页面上
See below whats get displayed on asp.net page
贷款人报告市场中断的截止日期(条款 REF _Ref395738761 \ n \\ \\ 17.3(市场中断)):
" REF _Ref395738761 \ n \ h" - 已添加,我们如何删除它,以便保持格式化。
" REF _Ref395738761 \n \h " - got added, how can we removed this, so that formatting is maintained.
推荐答案
嗨Lokesh,
Hi Lokesh,
您能否发布您已经尝试过的代码?
Could you please post the code which you've already tried?
>> 已添加,我们如何删除它,以便保持格式化。
>> Got added, how can we removed this, so that formatting is maintained.
根据您的描述,似乎您需要在asp.net页面上显示格式化文本。
Base on your description, it seems that you need a formatted text to display on asp.net page.
请尝试以下代码为您的项目设置主要文档内容:
Please try the code below to set main document content for your project:
const string docXml =
@"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>
<w:document xmlns:w=""http://schemas.openxmlformats.org/wordprocessingml/2006/main"">
<w:body>
<w:p>
<w:r>
<w:t>Deadline for Lenders to report market disruption (Clause 17.3(Market disruption)):</w:t>
</w:r>
</w:p>
</w:body>
</w:document>";
有关详细信息,请查看以下链接: 使用来自asp.net网页的Open XML
For more information, please review the following link: using Open XML from an asp.net webpage
希望它可以帮到你。期待收到您的回复。
Hopefully it helps you. Looking forward to hearing from you.
最诚挚的问候,
Yuki
这篇关于OpenXML - 显示word文档内容时格式丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!