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
最新文章
- windows平台eclipse for C++开发环境搭建
- oracle11g 拆分字符串的详细技巧
- session.load()和session.get()的区别
- hasOwnProperty()&;&;isPrototypeOf()
- viewWithTag获取subview规则详解
- for循环练习题
- 【转载】Gambit使用教程
- Android安全之WebViewUXSS漏洞
- [ Database ] [ Sybase ] [ SQLServer ] sybase 與SQL Server的界接方式
- C# WinForm的SplitContainer控件固定Panel大小[转]
- HTML与JS
- ASP.NET Web API框架揭秘:路由系统的几个核心类型
- Java中的Builder模式
- jmeter - 定时器
- [USACO12OPEN]书架Bookshelf
- Netty如何实现Reactor模式
- bzoj 1856
- ios线程和GCD和队列同步异步的关系
- 2018 USP Try-outsF - Optimizing Transportation in Portugal
- new.target
热门文章
- VS2010-MFC(文档、视图和框架:分割窗口)
- java在jvm虚拟机中是如何实现多态的?
- Error parsing XML: junk after document element这样的错误 - CSDN博客
- “fixed+relative≈≈absolute”——对BFC的再次思考
- k8s 是什么,有什么功能
- vue项目的实用配置
- selenium学习笔记11——driver.get(url) 页面加载时间太长
- python相关软件安装流程图解————————pycharm安装——————pycharm-professional-2018.3.1
- flask请求上下文源码分析
- VS2010-MFC(对话框:为对话框添加控件)