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
jsp导出的word默认打开是web视图,希望是页面视图的更多相关文章
- MyEclipse 设置JSP,HTML的默认打开方式,避免出现打开后上面出现浏览器
1. 2. 3. jsp的设置一样,这样myeclipse打开jsp就不会出现上面的浏览器了
- word表格从 web版视图 转 到页面视图 模式后 表格的一部分显示不出来
解决办法 在web视图 中选择 表格 ----->右键 表格属性 表格 下面 的 文字环绕 选择 无
- java使用poi将html导出word,默认打开页面视图
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:o ...
- 网页导出成word文档的默认视图方式问题
网页导出成word文档的默认视图方式问题 一般保存后的word文档默认是“Web版式视图”打开,这样会给客户的感觉不是真正的word文档,必须实现打开就是“页面视图” 1. 修改<html> ...
- MyEclipse设置jsp页默认打开方式
可以用来设置jsp页默认打开是代码编辑模式而不是半视图半代码的模式. 1.选择菜单Window→Preferences. 2.选择General→Editors→File Associations.在 ...
- ppt标签打开文件 word标签打开文件 窗口打开文件 粘贴默认方式
ppt标签打开文件 word标签打开文件 word窗口打开文件 ppt粘贴默认方式 word粘贴默认方式 ppt粘贴默认方式 只保留文本 == 通过 视图 切换窗口. == 层叠 样式 如下. == ...
- 在MyEclipse中改动jsp页面的默认打开方式
在JavaWeb项目中.当然有非常多jsp页面,可是我发现,双击打开jsp页面总是卡机.相对于打开其它java文件而言非常慢,感觉非常不舒服.MyEclipse中默认打开jsp页面是以可视化的形式展现 ...
- (转)WEB页面导出为Word文档后分页&横向打印的方法
<html> <HEAD> <title>WEB页面导出为Word文档后分页&横向打印的方法 </title> < ...
- 【MyEclipse】JSP默认打开方式 设置(双击)
下图为MyEclipse8.5设置界面,通过window->Preferences打开,并在General选项下选择 Editors->File Associations ,然后选择要设置 ...
随机推荐
- POJ-2752-Seek the Name-kmp的变形
The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the l ...
- [kuangbin带你飞]专题一 简单搜索 - C - Catch That Cow
#include<iostream> #include<cstdio> #include<string> #include<vector> #inclu ...
- python3爬虫lxml模块的安装
1:在下载lxml之前,要先查看python的版本信息, 在CMD命令行输入python 再输入import pip; print(pip.pep425tags.get_supported()) -- ...
- git-常见问题解决
1.fatal: refusing to merge unrelated histories 执行 $git pull origin master –allow-unrelated-histories ...
- 基于IDEA的SSM配置文件整合基础(有步骤)
今天进行了SSM框架的整合,遇到了很多的错误,但所幸都有解决,以下为基础的整合步骤,后续待完善 1.SSM整合所需要: spring的jar(包含tx).springmvc的jar.mybatis.j ...
- <Python基础>列表的基本操作
s = 'abCDeFg aBcDea' s1 = s.split('D',3) #以s1列表为例 print(s1) #增 s1.append('foxabc') #返回值None,直接增到列表的最 ...
- 18-3-bind
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Mybatis 动态insert动态插入的坑
在写insert子句的时候,由于不知道需要插入多少字段,mybatis通过prefix,suffix,suffixOverrides很好的解决了该问题,实现了动态insert语句. 用这种动态插入时& ...
- ThinkPHP模型基础类提供的连贯操作方法
ThinkPHP模型基础类提供的连贯操作方法(也有些框架称之为链式操作),可以有效的提高数据存取的代码清晰度和开发效率,并且支持所有的CURD操作. 直线电机哪家好 使用也比较简单, 假如我们现在要查 ...
- 爬虫——python——百度地图经纬度查询——经纬度查看地点地名——利用百度API获取地名经纬度——爬取所有的中国地址
import requests address = '40.8587960,86.866991' url = 'http://api.map.baidu.com/geocoder?output=jso ...