从 HTML 导出到 MS Word

发布于 2024-08-18 10:52:58 字数 75 浏览 2 评论 0原文

如何使用 VB.NET 在 ASP.NET 中将 HTML 保存为 Microsoft Word 文档?我需要一个特殊的库来执行转换吗?

How I can save HTML as Microsoft Word Document in ASP.NET with VB.NET? Do I need a special library to perform the conversion?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

故事未完 2024-08-25 10:52:58

考虑到 MS Word 可以立即读取 HTML,您只需将 Response.ContentType 更改为 application/ms-word 即可。

但是,如果您想要创建 .doc 文件,您可能需要查看 办公自动化

另一种方法是创建 XML MS-Word 文件,但这仅限于 Word 2003 及更高版本。

例如,下面的 XML 是保存在 Word XML 文件中的空文档。

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument 
  xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
  xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
  xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:o="urn:schemas-microsoft-com:office:office"
  xmlns:v="urn:schemas-microsoft-com:vml"
  xmlns:w10="urn:schemas-microsoft-com:office:word"
  xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
  xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
  xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2"
  xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
  w:macrosPresent="no" 
  w:embeddedObjPresent="no" 
  w:ocxPresent="no"
  xml:space="preserve">
<w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2" />
<o:DocumentProperties>
  <o:Author>Paulo Santos</o:Author>
  <o:LastAuthor>Paulo Santos</o:LastAuthor>
  <o:Revision>1</o:Revision>
  <o:TotalTime>0</o:TotalTime>
  <o:Created>2010-01-16T19:09:00Z</o:Created>
  <o:LastSaved>2010-01-16T19:09:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>0</o:Words>
  <o:Characters>0</o:Characters>
  <o:Company>PJ on Development</o:Company>
  <o:Lines>1</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>0</o:CharactersWithSpaces>
  <o:Version>12</o:Version>
</o:DocumentProperties>
<w:fonts>
  <w:defaultFonts w:ascii="Calibri" w:fareast="Calibri"
  w:h-ansi="Calibri" w:cs="Times New Roman" />
  <w:font w:name="Times New Roman">
    <w:panose-1 w:val="02020603050405020304" />
    <w:charset w:val="00" />
    <w:family w:val="Roman" />
    <w:pitch w:val="variable" />
    <w:sig w:usb-0="E0002AFF" w:usb-1="C0007841" w:usb-2="00000009"
    w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000" />
  </w:font>
  <w:font w:name="Cambria Math">
    <w:panose-1 w:val="02040503050406030204" />
    <w:charset w:val="01" />
    <w:family w:val="Roman" />
    <w:notTrueType />
    <w:pitch w:val="variable" />
    <w:sig w:usb-0="00000000" w:usb-1="00000000" w:usb-2="00000000"
    w:usb-3="00000000" w:csb-0="00000000" w:csb-1="00000000" />
  </w:font>
  <w:font w:name="Calibri">
    <w:panose-1 w:val="020F0502020204030204" />
    <w:charset w:val="00" />
    <w:family w:val="Swiss" />
    <w:pitch w:val="variable" />
    <w:sig w:usb-0="E10002FF" w:usb-1="4000ACFF" w:usb-2="00000009"
    w:usb-3="00000000" w:csb-0="0000019F" w:csb-1="00000000" />
  </w:font>
</w:fonts>
<w:styles>
  <w:versionOfBuiltInStylenames w:val="7" />
  <w:latentStyles w:defLockedState="off" w:latentStyleCount="267">
    <w:lsdException w:name="Normal" />
    <w:lsdException w:name="heading 1" />
    <w:lsdException w:name="heading 2" />
    <w:lsdException w:name="heading 3" />
    <w:lsdException w:name="heading 4" />
    <w:lsdException w:name="heading 5" />
    <w:lsdException w:name="heading 6" />
    <w:lsdException w:name="heading 7" />
    <w:lsdException w:name="heading 8" />
    <w:lsdException w:name="heading 9" />
    <w:lsdException w:name="toc 1" />
    <w:lsdException w:name="toc 2" />
    <w:lsdException w:name="toc 3" />
    <w:lsdException w:name="toc 4" />
    <w:lsdException w:name="toc 5" />
    <w:lsdException w:name="toc 6" />
    <w:lsdException w:name="toc 7" />
    <w:lsdException w:name="toc 8" />
    <w:lsdException w:name="toc 9" />
    <w:lsdException w:name="caption" />
    <w:lsdException w:name="Title" />
    <w:lsdException w:name="Default Paragraph Font" />
    <w:lsdException w:name="Subtitle" />
    <w:lsdException w:name="Strong" />
    <w:lsdException w:name="Emphasis" />
    <w:lsdException w:name="Table Grid" />
    <w:lsdException w:name="Placeholder Text" />
    <w:lsdException w:name="No Spacing" />
    <w:lsdException w:name="Light Shading" />
    <w:lsdException w:name="Light List" />
    <w:lsdException w:name="Light Grid" />
    <w:lsdException w:name="Medium Shading 1" />
    <w:lsdException w:name="Medium Shading 2" />
    <w:lsdException w:name="Medium List 1" />
    <w:lsdException w:name="Medium List 2" />
    <w:lsdException w:name="Medium Grid 1" />
    <w:lsdException w:name="Medium Grid 2" />
    <w:lsdException w:name="Medium Grid 3" />
    <w:lsdException w:name="Dark List" />
    <w:lsdException w:name="Colorful Shading" />
    <w:lsdException w:name="Colorful List" />
    <w:lsdException w:name="Colorful Grid" />
    <w:lsdException w:name="Light Shading Accent 1" />
    <w:lsdException w:name="Light List Accent 1" />
    <w:lsdException w:name="Light Grid Accent 1" />
    <w:lsdException w:name="Medium Shading 1 Accent 1" />
    <w:lsdException w:name="Medium Shading 2 Accent 1" />
    <w:lsdException w:name="Medium List 1 Accent 1" />
    <w:lsdException w:name="Revision" />
    <w:lsdException w:name="List Paragraph" />
    <w:lsdException w:name="Quote" />
    <w:lsdException w:name="Intense Quote" />
    <w:lsdException w:name="Medium List 2 Accent 1" />
    <w:lsdException w:name="Medium Grid 1 Accent 1" />
    <w:lsdException w:name="Medium Grid 2 Accent 1" />
    <w:lsdException w:name="Medium Grid 3 Accent 1" />
    <w:lsdException w:name="Dark List Accent 1" />
    <w:lsdException w:name="Colorful Shading Accent 1" />
    <w:lsdException w:name="Colorful List Accent 1" />
    <w:lsdException w:name="Colorful Grid Accent 1" />
    <w:lsdException w:name="Light Shading Accent 2" />
    <w:lsdException w:name="Light List Accent 2" />
    <w:lsdException w:name="Light Grid Accent 2" />
    <w:lsdException w:name="Medium Shading 1 Accent 2" />
    <w:lsdException w:name="Medium Shading 2 Accent 2" />
    <w:lsdException w:name="Medium List 1 Accent 2" />
    <w:lsdException w:name="Medium List 2 Accent 2" />
    <w:lsdException w:name="Medium Grid 1 Accent 2" />
    <w:lsdException w:name="Medium Grid 2 Accent 2" />
    <w:lsdException w:name="Medium Grid 3 Accent 2" />
    <w:lsdException w:name="Dark List Accent 2" />
    <w:lsdException w:name="Colorful Shading Accent 2" />
    <w:lsdException w:name="Colorful List Accent 2" />
    <w:lsdException w:name="Colorful Grid Accent 2" />
    <w:lsdException w:name="Light Shading Accent 3" />
    <w:lsdException w:name="Light List Accent 3" />
    <w:lsdException w:name="Light Grid Accent 3" />
    <w:lsdException w:name="Medium Shading 1 Accent 3" />
    <w:lsdException w:name="Medium Shading 2 Accent 3" />
    <w:lsdException w:name="Medium List 1 Accent 3" />
    <w:lsdException w:name="Medium List 2 Accent 3" />
    <w:lsdException w:name="Medium Grid 1 Accent 3" />
    <w:lsdException w:name="Medium Grid 2 Accent 3" />
    <w:lsdException w:name="Medium Grid 3 Accent 3" />
    <w:lsdException w:name="Dark List Accent 3" />
    <w:lsdException w:name="Colorful Shading Accent 3" />
    <w:lsdException w:name="Colorful List Accent 3" />
    <w:lsdException w:name="Colorful Grid Accent 3" />
    <w:lsdException w:name="Light Shading Accent 4" />
    <w:lsdException w:name="Light List Accent 4" />
    <w:lsdException w:name="Light Grid Accent 4" />
    <w:lsdException w:name="Medium Shading 1 Accent 4" />
    <w:lsdException w:name="Medium Shading 2 Accent 4" />
    <w:lsdException w:name="Medium List 1 Accent 4" />
    <w:lsdException w:name="Medium List 2 Accent 4" />
    <w:lsdException w:name="Medium Grid 1 Accent 4" />
    <w:lsdException w:name="Medium Grid 2 Accent 4" />
    <w:lsdException w:name="Medium Grid 3 Accent 4" />
    <w:lsdException w:name="Dark List Accent 4" />
    <w:lsdException w:name="Colorful Shading Accent 4" />
    <w:lsdException w:name="Colorful List Accent 4" />
    <w:lsdException w:name="Colorful Grid Accent 4" />
    <w:lsdException w:name="Light Shading Accent 5" />
    <w:lsdException w:name="Light List Accent 5" />
    <w:lsdException w:name="Light Grid Accent 5" />
    <w:lsdException w:name="Medium Shading 1 Accent 5" />
    <w:lsdException w:name="Medium Shading 2 Accent 5" />
    <w:lsdException w:name="Medium List 1 Accent 5" />
    <w:lsdException w:name="Medium List 2 Accent 5" />
    <w:lsdException w:name="Medium Grid 1 Accent 5" />
    <w:lsdException w:name="Medium Grid 2 Accent 5" />
    <w:lsdException w:name="Medium Grid 3 Accent 5" />
    <w:lsdException w:name="Dark List Accent 5" />
    <w:lsdException w:name="Colorful Shading Accent 5" />
    <w:lsdException w:name="Colorful List Accent 5" />
    <w:lsdException w:name="Colorful Grid Accent 5" />
    <w:lsdException w:name="Light Shading Accent 6" />
    <w:lsdException w:name="Light List Accent 6" />
    <w:lsdException w:name="Light Grid Accent 6" />
    <w:lsdException w:name="Medium Shading 1 Accent 6" />
    <w:lsdException w:name="Medium Shading 2 Accent 6" />
    <w:lsdException w:name="Medium List 1 Accent 6" />
    <w:lsdException w:name="Medium List 2 Accent 6" />
    <w:lsdException w:name="Medium Grid 1 Accent 6" />
    <w:lsdException w:name="Medium Grid 2 Accent 6" />
    <w:lsdException w:name="Medium Grid 3 Accent 6" />
    <w:lsdException w:name="Dark List Accent 6" />
    <w:lsdException w:name="Colorful Shading Accent 6" />
    <w:lsdException w:name="Colorful List Accent 6" />
    <w:lsdException w:name="Colorful Grid Accent 6" />
    <w:lsdException w:name="Subtle Emphasis" />
    <w:lsdException w:name="Intense Emphasis" />
    <w:lsdException w:name="Subtle Reference" />
    <w:lsdException w:name="Intense Reference" />
    <w:lsdException w:name="Book Title" />
    <w:lsdException w:name="Bibliography" />
    <w:lsdException w:name="TOC Heading" />
  </w:latentStyles>
  <w:style w:type="paragraph" w:default="on" w:styleId="Normal">
    <w:name w:val="Normal" />
    <w:rsid w:val="001F679D" />
    <w:pPr>
      <w:spacing w:after="200" w:line="276" w:line-rule="auto" />
    </w:pPr>
    <w:rPr>
      <wx:font wx:val="Calibri" />
      <w:sz w:val="22" />
      <w:sz-cs w:val="22" />
      <w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA" />
    </w:rPr>
  </w:style>
  <w:style w:type="character" w:default="on"
  w:styleId="DefaultParagraphFont">
    <w:name w:val="Default Paragraph Font" />
  </w:style>
  <w:style w:type="table" w:default="on" w:styleId="TableNormal">
    <w:name w:val="Normal Table" />
    <wx:uiName wx:val="Table Normal" />
    <w:rPr>
      <wx:font wx:val="Calibri" />
      <w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA" />
    </w:rPr>
    <w:tblPr>
      <w:tblInd w:w="0" w:type="dxa" />
      <w:tblCellMar>
        <w:top w:w="0" w:type="dxa" />
        <w:left w:w="108" w:type="dxa" />
        <w:bottom w:w="0" w:type="dxa" />
        <w:right w:w="108" w:type="dxa" />
      </w:tblCellMar>
    </w:tblPr>
  </w:style>
  <w:style w:type="list" w:default="on" w:styleId="NoList">
    <w:name w:val="No List" />
  </w:style>
</w:styles>
<w:shapeDefaults>
  <o:shapedefaults v:ext="edit" spidmax="2050" />
  <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1" />
  </o:shapelayout>
</w:shapeDefaults>
<w:docPr>
  <w:view w:val="print" />
  <w:zoom w:percent="100" />
  <w:doNotEmbedSystemFonts />
  <w:defaultTabStop w:val="720" />
  <w:punctuationKerning />
  <w:characterSpacingControl w:val="DontCompress" />
  <w:optimizeForBrowser />
  <w:validateAgainstSchema />
  <w:saveInvalidXML w:val="off" />
  <w:ignoreMixedContent w:val="off" />
  <w:alwaysShowPlaceholderText w:val="off" />
  <w:compat>
    <w:breakWrappedTables />
    <w:snapToGridInCell />
    <w:wrapTextWithPunct />
    <w:useAsianBreakRules />
    <w:dontGrowAutofit />
  </w:compat>
  <wsp:rsids>
    <wsp:rsidRoot wsp:val="0063767C" />
    <wsp:rsid wsp:val="001F679D" />
    <wsp:rsid wsp:val="0063767C" />
  </wsp:rsids>
</w:docPr>
<w:body>
  <w:p wsp:rsidR="001F679D" wsp:rsidRDefault="001F679D" />
  <w:sectPr wsp:rsidR="001F679D" wsp:rsidSect="001F679D">
    <w:pgSz w:w="12240" w:h="15840" />
    <w:pgMar w:top="1440" w:right="1440" w:bottom="1440"
    w:left="1440" w:header="720" w:footer="720" w:gutter="0" />
    <w:cols w:space="720" />
    <w:docGrid w:line-pitch="360" />
  </w:sectPr>
</w:body>
</w:wordDocument>

您可能不需要上面看到的所有项目,但这是可行的。

Considering the fact that MS Word can read HTML just right out of the box, you could simply change the Response.ContentType to application/ms-word.

However, if what you want is to create a .doc file, you might want to take a look in Office Automation.

Other way is to create an XML MS-Word file, but that limits you to Word 2003 and up.

For instance the XML below is an Empty document saved in word XML file.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument 
  xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
  xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
  xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:o="urn:schemas-microsoft-com:office:office"
  xmlns:v="urn:schemas-microsoft-com:vml"
  xmlns:w10="urn:schemas-microsoft-com:office:word"
  xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
  xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
  xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2"
  xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
  w:macrosPresent="no" 
  w:embeddedObjPresent="no" 
  w:ocxPresent="no"
  xml:space="preserve">
<w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2" />
<o:DocumentProperties>
  <o:Author>Paulo Santos</o:Author>
  <o:LastAuthor>Paulo Santos</o:LastAuthor>
  <o:Revision>1</o:Revision>
  <o:TotalTime>0</o:TotalTime>
  <o:Created>2010-01-16T19:09:00Z</o:Created>
  <o:LastSaved>2010-01-16T19:09:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>0</o:Words>
  <o:Characters>0</o:Characters>
  <o:Company>PJ on Development</o:Company>
  <o:Lines>1</o:Lines>
  <o:Paragraphs>1</o:Paragraphs>
  <o:CharactersWithSpaces>0</o:CharactersWithSpaces>
  <o:Version>12</o:Version>
</o:DocumentProperties>
<w:fonts>
  <w:defaultFonts w:ascii="Calibri" w:fareast="Calibri"
  w:h-ansi="Calibri" w:cs="Times New Roman" />
  <w:font w:name="Times New Roman">
    <w:panose-1 w:val="02020603050405020304" />
    <w:charset w:val="00" />
    <w:family w:val="Roman" />
    <w:pitch w:val="variable" />
    <w:sig w:usb-0="E0002AFF" w:usb-1="C0007841" w:usb-2="00000009"
    w:usb-3="00000000" w:csb-0="000001FF" w:csb-1="00000000" />
  </w:font>
  <w:font w:name="Cambria Math">
    <w:panose-1 w:val="02040503050406030204" />
    <w:charset w:val="01" />
    <w:family w:val="Roman" />
    <w:notTrueType />
    <w:pitch w:val="variable" />
    <w:sig w:usb-0="00000000" w:usb-1="00000000" w:usb-2="00000000"
    w:usb-3="00000000" w:csb-0="00000000" w:csb-1="00000000" />
  </w:font>
  <w:font w:name="Calibri">
    <w:panose-1 w:val="020F0502020204030204" />
    <w:charset w:val="00" />
    <w:family w:val="Swiss" />
    <w:pitch w:val="variable" />
    <w:sig w:usb-0="E10002FF" w:usb-1="4000ACFF" w:usb-2="00000009"
    w:usb-3="00000000" w:csb-0="0000019F" w:csb-1="00000000" />
  </w:font>
</w:fonts>
<w:styles>
  <w:versionOfBuiltInStylenames w:val="7" />
  <w:latentStyles w:defLockedState="off" w:latentStyleCount="267">
    <w:lsdException w:name="Normal" />
    <w:lsdException w:name="heading 1" />
    <w:lsdException w:name="heading 2" />
    <w:lsdException w:name="heading 3" />
    <w:lsdException w:name="heading 4" />
    <w:lsdException w:name="heading 5" />
    <w:lsdException w:name="heading 6" />
    <w:lsdException w:name="heading 7" />
    <w:lsdException w:name="heading 8" />
    <w:lsdException w:name="heading 9" />
    <w:lsdException w:name="toc 1" />
    <w:lsdException w:name="toc 2" />
    <w:lsdException w:name="toc 3" />
    <w:lsdException w:name="toc 4" />
    <w:lsdException w:name="toc 5" />
    <w:lsdException w:name="toc 6" />
    <w:lsdException w:name="toc 7" />
    <w:lsdException w:name="toc 8" />
    <w:lsdException w:name="toc 9" />
    <w:lsdException w:name="caption" />
    <w:lsdException w:name="Title" />
    <w:lsdException w:name="Default Paragraph Font" />
    <w:lsdException w:name="Subtitle" />
    <w:lsdException w:name="Strong" />
    <w:lsdException w:name="Emphasis" />
    <w:lsdException w:name="Table Grid" />
    <w:lsdException w:name="Placeholder Text" />
    <w:lsdException w:name="No Spacing" />
    <w:lsdException w:name="Light Shading" />
    <w:lsdException w:name="Light List" />
    <w:lsdException w:name="Light Grid" />
    <w:lsdException w:name="Medium Shading 1" />
    <w:lsdException w:name="Medium Shading 2" />
    <w:lsdException w:name="Medium List 1" />
    <w:lsdException w:name="Medium List 2" />
    <w:lsdException w:name="Medium Grid 1" />
    <w:lsdException w:name="Medium Grid 2" />
    <w:lsdException w:name="Medium Grid 3" />
    <w:lsdException w:name="Dark List" />
    <w:lsdException w:name="Colorful Shading" />
    <w:lsdException w:name="Colorful List" />
    <w:lsdException w:name="Colorful Grid" />
    <w:lsdException w:name="Light Shading Accent 1" />
    <w:lsdException w:name="Light List Accent 1" />
    <w:lsdException w:name="Light Grid Accent 1" />
    <w:lsdException w:name="Medium Shading 1 Accent 1" />
    <w:lsdException w:name="Medium Shading 2 Accent 1" />
    <w:lsdException w:name="Medium List 1 Accent 1" />
    <w:lsdException w:name="Revision" />
    <w:lsdException w:name="List Paragraph" />
    <w:lsdException w:name="Quote" />
    <w:lsdException w:name="Intense Quote" />
    <w:lsdException w:name="Medium List 2 Accent 1" />
    <w:lsdException w:name="Medium Grid 1 Accent 1" />
    <w:lsdException w:name="Medium Grid 2 Accent 1" />
    <w:lsdException w:name="Medium Grid 3 Accent 1" />
    <w:lsdException w:name="Dark List Accent 1" />
    <w:lsdException w:name="Colorful Shading Accent 1" />
    <w:lsdException w:name="Colorful List Accent 1" />
    <w:lsdException w:name="Colorful Grid Accent 1" />
    <w:lsdException w:name="Light Shading Accent 2" />
    <w:lsdException w:name="Light List Accent 2" />
    <w:lsdException w:name="Light Grid Accent 2" />
    <w:lsdException w:name="Medium Shading 1 Accent 2" />
    <w:lsdException w:name="Medium Shading 2 Accent 2" />
    <w:lsdException w:name="Medium List 1 Accent 2" />
    <w:lsdException w:name="Medium List 2 Accent 2" />
    <w:lsdException w:name="Medium Grid 1 Accent 2" />
    <w:lsdException w:name="Medium Grid 2 Accent 2" />
    <w:lsdException w:name="Medium Grid 3 Accent 2" />
    <w:lsdException w:name="Dark List Accent 2" />
    <w:lsdException w:name="Colorful Shading Accent 2" />
    <w:lsdException w:name="Colorful List Accent 2" />
    <w:lsdException w:name="Colorful Grid Accent 2" />
    <w:lsdException w:name="Light Shading Accent 3" />
    <w:lsdException w:name="Light List Accent 3" />
    <w:lsdException w:name="Light Grid Accent 3" />
    <w:lsdException w:name="Medium Shading 1 Accent 3" />
    <w:lsdException w:name="Medium Shading 2 Accent 3" />
    <w:lsdException w:name="Medium List 1 Accent 3" />
    <w:lsdException w:name="Medium List 2 Accent 3" />
    <w:lsdException w:name="Medium Grid 1 Accent 3" />
    <w:lsdException w:name="Medium Grid 2 Accent 3" />
    <w:lsdException w:name="Medium Grid 3 Accent 3" />
    <w:lsdException w:name="Dark List Accent 3" />
    <w:lsdException w:name="Colorful Shading Accent 3" />
    <w:lsdException w:name="Colorful List Accent 3" />
    <w:lsdException w:name="Colorful Grid Accent 3" />
    <w:lsdException w:name="Light Shading Accent 4" />
    <w:lsdException w:name="Light List Accent 4" />
    <w:lsdException w:name="Light Grid Accent 4" />
    <w:lsdException w:name="Medium Shading 1 Accent 4" />
    <w:lsdException w:name="Medium Shading 2 Accent 4" />
    <w:lsdException w:name="Medium List 1 Accent 4" />
    <w:lsdException w:name="Medium List 2 Accent 4" />
    <w:lsdException w:name="Medium Grid 1 Accent 4" />
    <w:lsdException w:name="Medium Grid 2 Accent 4" />
    <w:lsdException w:name="Medium Grid 3 Accent 4" />
    <w:lsdException w:name="Dark List Accent 4" />
    <w:lsdException w:name="Colorful Shading Accent 4" />
    <w:lsdException w:name="Colorful List Accent 4" />
    <w:lsdException w:name="Colorful Grid Accent 4" />
    <w:lsdException w:name="Light Shading Accent 5" />
    <w:lsdException w:name="Light List Accent 5" />
    <w:lsdException w:name="Light Grid Accent 5" />
    <w:lsdException w:name="Medium Shading 1 Accent 5" />
    <w:lsdException w:name="Medium Shading 2 Accent 5" />
    <w:lsdException w:name="Medium List 1 Accent 5" />
    <w:lsdException w:name="Medium List 2 Accent 5" />
    <w:lsdException w:name="Medium Grid 1 Accent 5" />
    <w:lsdException w:name="Medium Grid 2 Accent 5" />
    <w:lsdException w:name="Medium Grid 3 Accent 5" />
    <w:lsdException w:name="Dark List Accent 5" />
    <w:lsdException w:name="Colorful Shading Accent 5" />
    <w:lsdException w:name="Colorful List Accent 5" />
    <w:lsdException w:name="Colorful Grid Accent 5" />
    <w:lsdException w:name="Light Shading Accent 6" />
    <w:lsdException w:name="Light List Accent 6" />
    <w:lsdException w:name="Light Grid Accent 6" />
    <w:lsdException w:name="Medium Shading 1 Accent 6" />
    <w:lsdException w:name="Medium Shading 2 Accent 6" />
    <w:lsdException w:name="Medium List 1 Accent 6" />
    <w:lsdException w:name="Medium List 2 Accent 6" />
    <w:lsdException w:name="Medium Grid 1 Accent 6" />
    <w:lsdException w:name="Medium Grid 2 Accent 6" />
    <w:lsdException w:name="Medium Grid 3 Accent 6" />
    <w:lsdException w:name="Dark List Accent 6" />
    <w:lsdException w:name="Colorful Shading Accent 6" />
    <w:lsdException w:name="Colorful List Accent 6" />
    <w:lsdException w:name="Colorful Grid Accent 6" />
    <w:lsdException w:name="Subtle Emphasis" />
    <w:lsdException w:name="Intense Emphasis" />
    <w:lsdException w:name="Subtle Reference" />
    <w:lsdException w:name="Intense Reference" />
    <w:lsdException w:name="Book Title" />
    <w:lsdException w:name="Bibliography" />
    <w:lsdException w:name="TOC Heading" />
  </w:latentStyles>
  <w:style w:type="paragraph" w:default="on" w:styleId="Normal">
    <w:name w:val="Normal" />
    <w:rsid w:val="001F679D" />
    <w:pPr>
      <w:spacing w:after="200" w:line="276" w:line-rule="auto" />
    </w:pPr>
    <w:rPr>
      <wx:font wx:val="Calibri" />
      <w:sz w:val="22" />
      <w:sz-cs w:val="22" />
      <w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA" />
    </w:rPr>
  </w:style>
  <w:style w:type="character" w:default="on"
  w:styleId="DefaultParagraphFont">
    <w:name w:val="Default Paragraph Font" />
  </w:style>
  <w:style w:type="table" w:default="on" w:styleId="TableNormal">
    <w:name w:val="Normal Table" />
    <wx:uiName wx:val="Table Normal" />
    <w:rPr>
      <wx:font wx:val="Calibri" />
      <w:lang w:val="EN-US" w:fareast="EN-US" w:bidi="AR-SA" />
    </w:rPr>
    <w:tblPr>
      <w:tblInd w:w="0" w:type="dxa" />
      <w:tblCellMar>
        <w:top w:w="0" w:type="dxa" />
        <w:left w:w="108" w:type="dxa" />
        <w:bottom w:w="0" w:type="dxa" />
        <w:right w:w="108" w:type="dxa" />
      </w:tblCellMar>
    </w:tblPr>
  </w:style>
  <w:style w:type="list" w:default="on" w:styleId="NoList">
    <w:name w:val="No List" />
  </w:style>
</w:styles>
<w:shapeDefaults>
  <o:shapedefaults v:ext="edit" spidmax="2050" />
  <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1" />
  </o:shapelayout>
</w:shapeDefaults>
<w:docPr>
  <w:view w:val="print" />
  <w:zoom w:percent="100" />
  <w:doNotEmbedSystemFonts />
  <w:defaultTabStop w:val="720" />
  <w:punctuationKerning />
  <w:characterSpacingControl w:val="DontCompress" />
  <w:optimizeForBrowser />
  <w:validateAgainstSchema />
  <w:saveInvalidXML w:val="off" />
  <w:ignoreMixedContent w:val="off" />
  <w:alwaysShowPlaceholderText w:val="off" />
  <w:compat>
    <w:breakWrappedTables />
    <w:snapToGridInCell />
    <w:wrapTextWithPunct />
    <w:useAsianBreakRules />
    <w:dontGrowAutofit />
  </w:compat>
  <wsp:rsids>
    <wsp:rsidRoot wsp:val="0063767C" />
    <wsp:rsid wsp:val="001F679D" />
    <wsp:rsid wsp:val="0063767C" />
  </wsp:rsids>
</w:docPr>
<w:body>
  <w:p wsp:rsidR="001F679D" wsp:rsidRDefault="001F679D" />
  <w:sectPr wsp:rsidR="001F679D" wsp:rsidSect="001F679D">
    <w:pgSz w:w="12240" w:h="15840" />
    <w:pgMar w:top="1440" w:right="1440" w:bottom="1440"
    w:left="1440" w:header="720" w:footer="720" w:gutter="0" />
    <w:cols w:space="720" />
    <w:docGrid w:line-pitch="360" />
  </w:sectPr>
</w:body>
</w:wordDocument>

You may not need all the items seen above, but it's feasible.

所谓喜欢 2024-08-25 10:52:58

您可以将页面标题中的内容类型更改为 application/vnd.ms-word,这应该可以解决问题,这当然是最简单的方法,我相信还有其他方法。

You could change the content type in your page header to application/vnd.ms-word, that should do the trick, this of course is the simplest way, I am sure there are others.

情话难免假 2024-08-25 10:52:58

您可以使用 Office 自动化或尝试自己生成本机文件格式。不过,我建议使用专门的库来完成这项工作。我自己使用了一个库来进行 Excel 导出,并且有一个合适的 .NET 对象模型来操作,而不是了解本机文件结构,这很好。节省大量时间和工作。 Aspose 可能有适合您的组件或库。

You can use Office automation or try to generate in the native file format yourself. However, I can recommend using a specialized library for this work. I've used a library myself for Excel export, and it is nice to have a suitable .NET object model to manipulate, instead of knowing the native file structure. Saves a lot of time and work. Aspose might have the right component or library for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文