当前位置: 首页 > 知识库问答 >
问题:

为什么使用 Xhtml 导入器和替代格式输入使用 docx4j 生成文档时存在样式不匹配的部分

宓毅庵
2023-03-14

我正在尝试将文档从 HTML 生成到文档。通过替代格式输入部分类文档以正确的样式正确生成。

但是

当我对同一个html文档使用XhtmlImporter类时,得到的是不同的结果。我想使用XhtmlImporter类

我如何解决这个问题?

下面是用于生成文档的Html和java代码

<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/1999/xhtml" lang="en">
   <head>
      <title>MonthlyReport</title><style>
                    table
                    {
                        border:double #000;
                        table-layout:fixed;
                        vertical-align:top;
                        border-collapse:collapse;
                        width:7.25in;
                    
                    }
                    .main-title
                    {
                        margin-top:5%;
                        font-size:48pt;
                        font-family:Century Gothic;
                        color:#2F5897;
                        text-align:center;
                        font-weight:300;
                    }
                    .year
                    {
                        padding-top:10%;
                        text-align:center;
                        font-size:18px;
                    
                    }
                    .other-detail
                    {
                        padding-top:10%;
                        padding-bottom:10%;
                        font-weight:bold;
                        text-align:center;
                        font-size:18px;
                    }
                    .cont
                    {
                        font-family:Palatino Linotype;
                        margin:0 auto;
                        margin-top:10px;
                    }
                    .cont-table
                    {
                        border:double #000;
                        table-layout:fixed;
                        vertical-align:top;
                        border-collapse:collapse;
                        width:7.25in;
                    }
                    .cont h1
                    {
                        font-family:Century Gothic;
                        color:#2F5897;
                        font-weight:400;
                        margin-left:.15in;
                    }
                    .cont h4
                    {
                        font-family:Century Gothic;
                        font-weight:400;
                        margin-left:.15in;
                    }
                    .cont .school-detail
                    {
                        margin-left:.1in;
                        margin-right:.1in;
                    }
                    .cont ol
                    {
                        margin-left:1in;
                        margin-right:1in;
                    }
                    .cont li
                    {
                        margin-bottom:.25in;
                    }
                    .cont-heading
                    {
                        margin-left:.5in;
                        font-weight:bold;
                        text-decoration:underline;
                        margin-top:.35in;
                    
                    }
                    span
                    {
                        display:block;
                        padding-bottom:10px;
                    }
                    .rheight
                    {
                        height:3.25in;
                    }
                    span.DefaultParagraphFont{
                        display:inline;
                    }
                    .DocDefaults{
                        display:block;
                        margin-bottom:4mm;
                        line-height:115%;
                        font-size:11.0pt;
                    }
                    .Normal{
                        display:block;
                    }</style></head>
   <body>
      <table cellpadding="0" cellspacing="0" align="center">
         <tr class="rheight">
            <td> &nbsp; </td>
         </tr>
         <tr>
            <td>
               <div class="main-title"> Monthly report </div>
            </td>
         </tr>
         <tr>
            <td>
               <div class="year">2016-2017</div>
            </td>
         </tr>
         <tr>
            <td>
               <div class="other-detail">MONTH: September<br></br> CITY: BANGALORE<br></br> FACILITATOR:
                  MANIKANDAN<br></br></div>
            </td>
         </tr>
         <tr class="rheight">
            <td> &nbsp; </td>
         </tr>
      </table>
      <table cellpadding="0" cellspacing="0" align="center" class="cont-table">
         <tr>
            <td>
               <div class="cont">
                  <h1>Monthly Report</h1>
                  <h4>2016-2017</h4><br></br><p class="school-detail">
                     <p class="cont-heading">102 INTERNATONAL PUBLIC SCHOOL(ICSE)</p>
                     <ol>
                        <li><strong>ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING
                              TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY
                              SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION
                              THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES
                              CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR
                              NOTICE REGARDING THE SCHOOL.</strong><br></br>z1
                        </li>
                        <li><strong>ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING
                              BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE
                              LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK).</strong><br></br>z2
                        </li>
                        <li><strong>AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.
                              AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.</strong><br></br>z3
                        </li>
                        <li><strong>WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.
                              WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.</strong><br></br>z4
                        </li>
                        <li><strong>DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS
                              OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC.</strong><br></br>z5
                        </li>
                     </ol>
                     <p class="cont-heading">Photos</p>
                     <p class="cont-heading">102 INTERNATONAL PUBLIC SCHOOL(ICSE)</p>
                     <p class="Normal DocDefaults " style="margin-bottom: 0in;"><span class="DefaultParagraphFont " style="font-weight: bold;font-size: 14.0pt;text-decoration: underline;">
                           <center><img height="355" width="620" src="C:\Oracle\Middleware\Weblogic12.1.3\user_projects\domains\springtutorial\servers\ManagedServer\tmp\_WL_user\FMS\ti01mv\public\Hydrangeas.jpg" alt="C:/Users/Public/Pictures/Sample Pictures/Hydrangeas.jpg"></img><p style="text-align:center">Image-1</p>
                           </center>I
                           </span></p>
                     <p class="cont-heading">102 INTERNATONAL PUBLIC SCHOOL(ICSE)</p>
                     <p class="Normal DocDefaults " style="margin-bottom: 0in;"><span class="DefaultParagraphFont " style="font-weight: bold;font-size: 14.0pt;text-decoration: underline;">
                           <center><img height="355" width="620" src="C:\Oracle\Middleware\Weblogic12.1.3\user_projects\domains\springtutorial\servers\ManagedServer\tmp\_WL_user\FMS\ti01mv\public\Hydrangeas.jpg" alt="C:/Users/Public/Pictures/Sample Pictures/Hydrangeas.jpg"></img><p style="text-align:center">Image-1</p>
                           </center>I
                           </span></p>
                     <p class="cont-heading">102 INTERNATONAL PUBLIC SCHOOL(ICSE)</p>
                     <p class="Normal DocDefaults " style="margin-bottom: 0in;"><span class="DefaultParagraphFont " style="font-weight: bold;font-size: 14.0pt;text-decoration: underline;">
                           <center><img height="355" width="620" src="C:\Oracle\Middleware\Weblogic12.1.3\user_projects\domains\springtutorial\servers\ManagedServer\tmp\_WL_user\FMS\ti01mv\public\Hydrangeas.jpg" alt="C:/Users/Public/Pictures/Sample Pictures/Hydrangeas.jpg"></img><p style="text-align:center">Image-2</p>
                           </center>I
                           </span></p>
                     <p class="cont-heading">ELITE EDUCATIONAL TRUST</p>
                     <ol>
                        <li><strong>ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING
                              TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY
                              SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION
                              THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES
                              CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR
                              NOTICE REGARDING THE SCHOOL.</strong><br></br>y1
                        </li>
                        <li><strong>ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING
                              BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE
                              LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK).</strong><br></br>y2
                        </li>
                        <li><strong>AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.
                              AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.</strong><br></br>y3
                        </li>
                        <li><strong>WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.
                              WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.</strong><br></br>y4
                        </li>
                        <li><strong>DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS
                              OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC.</strong><br></br>y5
                        </li>
                     </ol>
                     <p class="cont-heading">Photos</p>
                     <p class="cont-heading">ACHALA VIDHYA MANDIRA</p>
                     <ol>
                        <li><strong>ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING
                              TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY
                              SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION
                              THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES
                              CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR
                              NOTICE REGARDING THE SCHOOL.</strong><br></br>q1
                        </li>
                        <li><strong>ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING
                              BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE
                              LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK).</strong><br></br>q2
                        </li>
                        <li><strong>AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.
                              AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.</strong><br></br>q3
                        </li>
                        <li><strong>WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.
                              WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.</strong><br></br>q4
                        </li>
                        <li><strong>DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS
                              OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC.</strong><br></br>q5
                        </li>
                     </ol>
                     <p class="cont-heading">Photos</p>
                     <p class="cont-heading">ACHALA VIDHYA MANDIRA</p>
                     <p class="Normal DocDefaults " style="margin-bottom: 0in;"><span class="DefaultParagraphFont " style="font-weight: bold;font-size: 14.0pt;text-decoration: underline;">
                           <center><img height="355" width="620" src="C:\Oracle\Middleware\Weblogic12.1.3\user_projects\domains\springtutorial\servers\ManagedServer\tmp\_WL_user\FMS\ti01mv\public\Hydrangeas.jpg" alt="C:/Users/Public/Pictures/Sample Pictures/Hydrangeas.jpg"></img><p style="text-align:center">Image-1</p>
                           </center>I
                           </span></p>
                     <p class="cont-heading">ACHALA VIDHYA MANDIRA</p>
                     <p class="Normal DocDefaults " style="margin-bottom: 0in;"><span class="DefaultParagraphFont " style="font-weight: bold;font-size: 14.0pt;text-decoration: underline;">
                           <center><img height="355" width="620" src="C:\Oracle\Middleware\Weblogic12.1.3\user_projects\domains\springtutorial\servers\ManagedServer\tmp\_WL_user\FMS\ti01mv\public\Hydrangeas.jpg" alt="C:/Users/Public/Pictures/Sample Pictures/Hydrangeas.jpg"></img><p style="text-align:center">Image-2</p>
                           </center>I
                           </span></p>
                     <p class="cont-heading">CITIZENS HIGH SCHOOL</p>
                     <ol>
                        <li><strong>ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING
                              TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY
                              SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES CONDUCTED IN THIS SCHOOL. PLEASE MENTION
                              THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR NOTICE REGARDING THE SCHOOL. ACTIVITIES
                              CONDUCTED IN THIS SCHOOL. PLEASE MENTION THE TYPE OF SESSIONS CONDUCTED, ANY SPECIFIC POINT YOU WOULD LIKE TO BRING TO OUR
                              NOTICE REGARDING THE SCHOOL.</strong><br></br>w1
                        </li>
                        <li><strong>ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING
                              BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE
                              LINK). ANY SPECIFIC ACTIVITY WORTH MENTIONING BY THE STUDENTS(ATTACH IMAGES TO SEPARATE LINK).</strong><br></br>w2
                        </li>
                        <li><strong>AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL. AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.
                              AT LEAST ONE TESTIMONIAL FROM ONE SCHOOL.</strong><br></br>w3
                        </li>
                        <li><strong>WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.
                              WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME. WHAT WENT RIGHT; WHAT DID NOT GO RIGHT &amp; REASONS FOR THE SAME.</strong><br></br>w4
                        </li>
                        <li><strong>DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS
                              OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC. DETAILS OF INTERACTION WITH THE PRINCIPAL AND/OR THE POC.</strong><br></br>w5
                        </li>
                     </ol>
                     <p class="cont-heading">Photos</p>
                     <p class="cont-heading">CITIZENS HIGH SCHOOL</p>
                     <p class="Normal DocDefaults " style="margin-bottom: 0in;"><span class="DefaultParagraphFont " style="font-weight: bold;font-size: 14.0pt;text-decoration: underline;">
                           <center><img height="355" width="620" src="C:\Oracle\Middleware\Weblogic12.1.3\user_projects\domains\springtutorial\servers\ManagedServer\tmp\_WL_user\FMS\ti01mv\public\Hydrangeas.jpg" alt="C:/Users/Public/Pictures/Sample Pictures/Hydrangeas.jpg"></img><p style="text-align:center">Image-1</p>
                           </center>I
                           </span></p>
                     <p class="cont-heading">CITIZENS HIGH SCHOOL</p>
                     <p class="Normal DocDefaults " style="margin-bottom: 0in;"><span class="DefaultParagraphFont " style="font-weight: bold;font-size: 14.0pt;text-decoration: underline;">
                           <center><img height="355" width="620" src="C:\Oracle\Middleware\Weblogic12.1.3\user_projects\domains\springtutorial\servers\ManagedServer\tmp\_WL_user\FMS\ti01mv\public\Hydrangeas.jpg" alt="C:/Users/Public/Pictures/Sample Pictures/Hydrangeas.jpg"></img><p style="text-align:center">Image-2</p>
                           </center>I
                           </span></p>
                  </p>
               </div>
            </td>
         </tr>
      </table>
   </body>
</html>

AlternativeFormatInputPart方法

private static void documentGenerator(String html, File file) throws Docx4JException, JAXBException {
//Word Processing Package
WordprocessingMLPackage wordMLPackage = getWordMLPackage();
NumberingDefinitionsPart ndp = new NumberingDefinitionsPart();
wordMLPackage.getMainDocumentPart().addTargetPart(ndp);
ndp.unmarshalDefaultNumbering();
AlternativeFormatInputPart inputPart = new AlternativeFormatInputPart(AltChunkType.Xhtml);
inputPart.setContentType(new ContentType("text/html"));
inputPart.setBinaryData(html.getBytes());
Relationship altChunkRel = wordMLPackage.getMainDocumentPart().addTargetPart(inputPart);
// .. the bit in document body
CTAltChunk ac = Context.getWmlObjectFactory().createCTAltChunk();
ac.setId(altChunkRel.getId());
wordMLPackage.getMainDocumentPart().addObject(ac);
// .. content type
wordMLPackage.getContentTypeManager().addDefaultContentType("html", "text/html");
//Saving the Document
wordMLPackage.save(file);
}

XHtml导入器

WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();

NumberingDefinitionsPart ndp = new NumberingDefinitionsPart();
wordMLPackage.getMainDocumentPart().addTargetPart(ndp);
ndp.unmarshalDefaultNumbering();

// Convert the XHTML, and add it into the empty docx we made
XHTMLImporterImpl XHTMLImporter = new XHTMLImporterImpl(wordMLPackage);
XHTMLImporter.setRunFormatting(FormattingOption.CLASS_PLUS_OTHER);
XHTMLImporter.setHyperlinkStyle("Hyperlink");
wordMLPackage.getMainDocumentPart().getContent().addAll(XHTMLImporter.convert(unescaped, null));
wordMLPackage.save(new java.io.File("C:/OUT_from_XHTML.docx"));

共有1个答案

司马英才
2023-03-14

正如我在https://stackoverflow.com/a/41587822/1031689解释的那样,当你保存一个包含altChunk的docx时,你是在依靠Word来转换内容。

Word的转换不同于docx4j的XHTMLImporterImpl;后者的目的不是模仿前者。

关于docx4j的XHTMLImporterImpl的具体问题,可以在此处、相关的docx4j论坛或https://github.com/plutext/docx4j-ImportXHTML/issues视情况而定。

如果您坚持每篇文章一个问题,您将获得最佳结果。

 类似资料:
  • 我正在使用和从yaml文件生成java服务器API,如下所示: 我遇到的问题是,生成的代码试图导入一个不存在的类。API应该接受pet类型的对象并返回相同的pet。宠物应该是猫、狗或蜥蜴。我使用了openapi规范中的继承示例,并从中构建了以下yaml文件: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.

  • 我想得到输入部分中每个变量使用的格式列表。例如,我们有一个csv文件,并手动将数据导入SAS。在代码部分,我们将有如下smth: 我想知道输入部分使用的是什么格式,即:BEST1。只需9美元。对于B,MMDDYY9。对于C等。 我已经找到了总结SASHELP. CARS数据集中每个变量的格式和格式的代码,但是我找不到INPUT部分使用的格式。有人知道在哪里能找到吗?有时(对于数值变量),这些格式可

  • 本文向大家介绍页面导入样式时,使用link和@import有什么区别?相关面试题,主要包含被问及页面导入样式时,使用link和@import有什么区别?时的应答技巧和注意事项,需要的朋友参考一下 link是HTML标签,@import在css中使用 @import会block后续资源加载 我记得以前网上有人测试过,在IE下@import的文件会被安排到最后下载,也就是顺序会有问题,而使用link不

  • 我有一个与XPages-docx4j类似的问题,用文本替换书签,但我想保留样式。我的书签不在文本上(因为它是由Google Docs创建的docx),我想保留书签后面的文本,以便将其包含在书签中并保持其样式。例如: 我找到了删除书签后文本的解决方案,我找到了在书签内添加文本的解决方法,但我无法保留样式。 我不是以英语为母语的人,所以如果我不清楚,请毫不犹豫地问我。

  • 我正在使用通过加载具有内部样式的html文件在我的应用程序中生成pdf。我的超文本标记语言页面是这样的:

  • 我试图导入一个对象到蒙戈。但是当我试图使用对象的值作为_id它失败了。错误,即:[CastError: Cast to ObjectID在路径_id]的值为11563195失败,以及稍后的[错误:文档在保存之前必须有_id] 我做错了什么? 以下是使用的模式: 非常感谢您的时间和帮助。