zoukankan      html  css  js  c++  java
  • jsp导出的word默认打开是web视图,希望是页面视图

    方法1

    ( velocity+java )我也遇到了这个问题,已经解决:
    1 .<html xmlns:v='urn:schemas-microsoft-com:vml'xmlns:o='urn:schemas-microsoft-com:office:office'xmlns:w='urn:schemas-microsoft-com:office:word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'xmlns='http://www.w3.org/TR/REC-html40'  xmlns='http://www.w3.org/1999/xhtml' >


    2. ## 处理默认视图为 页面视图 
    <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val="Cambria Math"/><m:brkBin m:val="before"/><m:brkBinSub m:val="--"/><m:smallFrac m:val="off"/><m:dispDef/><m:lMargin m:val="0"/> <m:rMargin m:val="0"/><m:defJc m:val="centerGroup"/><m:wrapIndent m:val="1440"/><m:intLim m:val="subSup"/><m:naryLim m:val="undOvr"/></m:mathPr></w:WordDocument></xml><![endif]-->
    ## 处理默认视图为 页面视图 

    来源:http://bbs.csdn.net/topics/390734012

    方法2

    <!--[if gte mso 9]>  

      <xml>  

     <w:WordDocument>  

          <w:View>Print</w:View>  

          <w:DoNotOptimizeForBrowser/>  

          <w:Compatibility>  

            <w:DontGrowAutofit/>  

          </w:Compatibility>  

        </w:WordDocument>  

      </xml>  

    <![endif]--> 

    替换原jsp中的<head>中<!--[if gte mso 9]>  开头的代码

    来源:http://blog.csdn.net/coolwubo/article/details/39530229

  • 相关阅读:
    百度正确的打开姿势
    无法安装或运行此应用程序。该应用程序要求首先在"全局程序集缓存(GAC)"中安装程序集 收藏
    ASP.NET智能提示(一)
    全屏窗体的完整方法(转)
    AutoCompleteExtender轻易实现搜索智能提示 附带一点小讨论
    Winform实现百度搜索框智能提示功能( C# )
    C#(asp.net)仿baidu或google智能匹配搜索下拉框
    vs2008 asp.net ajax控件实现百度,谷歌智能搜索
    js实现搜索框智能提示上下移动效果
    sql server 去重复 转帖的
  • 原文地址:https://www.cnblogs.com/xlj227/p/6672560.html
Copyright © 2011-2022 走看看