请教displaytag输出Excel表格时,如何将格内的链接去掉? 在一个colume 里,文字上有链接,如:<a href="....">内容</a>,在输出到excel中时,我只想得到“内容”二字,各位有什莫办法吗? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把取得的字符串截掉你不要的塞。String test = "<a herf="adfasd">testme</a>";String temp = "";int position = test.indexOf(">");temp = test.subString(position+1);position = test.indexOf("<");temp = temp.subString(0, position); ///temp is testme now不知道是不是楼主的意思。 LZ如何将URL也导入进去的呢 想学习 呵呵,怪我没说清楚。我在页面输出表格时使用了displaytag这个库,它可以将整个表格输出成excel表保存,如下:<display:table name="${userList}" cellspacing="0" cellpadding="0" requestURI="" defaultsort="1" pagesize="2" styleClass="list" export="true"> <display:column property="username" sort="true" headerClass="sortable" width="20%" url="/admin/editUser.html?from=list" paramId="username" paramProperty="username" titleKey="user.username"/> <display:column property="firstName" sort="true" headerClass="sortable" width="25%" titleKey="user.firstName" /> <display:column property="userinf" sort="true" headerClass="sortable" width="31%" titleKey="user.userinf"><a href="http://www.aa.com/bb.jsp">详情</a></display:column> <display:setProperty name="export.excel.filename" value="User List.xls"/></display:table>这时,表格下方会出现输出为excel的按钮,点击就会将表格保存为excel表格,但他会将单元格内所有的内容都转到excel中去,如最后一个单元格<a href="http://www.aa.com/bb.jsp">详情</a>,而我只想要“详情”二字,各位有没有什么好办法? 如果使用的是1.1版本,需要在displaytag.properties中配置excel的部分添加下面语句:export.excel.class=org.displaytag.export.excel.ExcelHssfView 新手,基于s2sh做了个增删改查的demo,想要通过搜索id得到学生信息,该怎么做? Java web开发中怎么把图片存入数据库? 我想买一本java书,关于ssh框架的,我也不知道企业里那个框架勇的比较多,请各位师兄指点指点,谢谢 求一个排序加分页的代码 怎样让登录的信息保留一天或一周啊? 背景大小问题 tomcat的配置问题,懂的请进! 正则表达式的一点问题 tomcat服务器怎么启用struts2 在线给分!提供servlet例子的都有分! 初学者关于入门提问----开发一个手机可以登陆的网站需要用到那些东西!! wap1.2问题??
String test = "<a herf="adfasd">testme</a>";
String temp = "";
int position = test.indexOf(">");
temp = test.subString(position+1);
position = test.indexOf("<");
temp = temp.subString(0, position); ///temp is testme now
不知道是不是楼主的意思。
<display:table name="${userList}" cellspacing="0" cellpadding="0"
requestURI="" defaultsort="1"
pagesize="2" styleClass="list" export="true">
<display:column property="username" sort="true"
headerClass="sortable" width="20%"
url="/admin/editUser.html?from=list"
paramId="username" paramProperty="username"
titleKey="user.username"/>
<display:column property="firstName" sort="true"
headerClass="sortable" width="25%"
titleKey="user.firstName" />
<display:column property="userinf" sort="true" headerClass="sortable"
width="31%" titleKey="user.userinf"><a href="http://www.aa.com/bb.jsp">详情</a></display:column> <display:setProperty name="export.excel.filename" value="User List.xls"/>
</display:table>这时,表格下方会出现输出为excel的按钮,点击就会将表格保存为excel表格,但他会将单元格内所有的内容都转到excel中去,如最后一个单元格<a href="http://www.aa.com/bb.jsp">详情</a>,而我只想要“详情”二字,各位有没有什么好办法?