关于ECSIDE导出EXCEL的问题

tucw 2008-02-19 03:03:32
我们在开发的WEB报表中使用了ECSIDE技术,但是使用后有个问题,导出的EXCEL文件只有SHEET的名称,没有任何数据.请问这个问题如何解决?
我的页面代码如下:
<ec:table showHeader="true" classic="true" width="100%" height="280px"
items="${repStoreInOutList.repStoreInOuts}"
xlsFileName="${text['repStoreInOutList.title']}.xls"
csvFileName="${text['repStoreInOutList.title']}.csv"
var="repStoreInOutForm" showPrint="true"
action="${pageContext.request.contextPath}/vpm/rep/repStoreInOut.html"
rowsDisplayed="20" retrieveRowsCallback="process" sortRowsCallback="limit" filterRowsCallback="limit" sortable="true">
<ec:row>
<ec:column width="80" property="_0" title="${text['repStoreInOutList.id']}" sortable="false" value="${GLOBALROWCOUNT}" />
<ec:column width="160" property="CIF_CK_C" title="${text['repStoreInOutList.storec']}" style="text-align:center;"/>
<ec:column width="160" property="CIF_CK_CN" title="${text['repStoreInOutList.storecn']}" style="text-align:center;"/>
<ec:column width="160" property="CIF_INV_PRICE" title="${text['repStoreInOutList.sumprice']}" >
<fmt:formatNumber value="${repStoreInOutForm.CIF_INV_PRICE}"
type="currency" maxFractionDigits="2" minFractionDigits="2"></fmt:formatNumber>
</ec:column>
<ec:column width="160" property="CIF_INV_NUM" title="${text['repStoreInOutList.sumnum']}" style="text-align:right;">
<fmt:formatNumber value="${repStoreInOutForm.CIF_INV_NUM}"
type="number" maxFractionDigits="2" minFractionDigits="2"></fmt:formatNumber>
</ec:column>
<ec:column width="160" property="CIF_INV_MONEY" title="${text['repStoreInOutList.summoney']}" style="text-align:right;" >
<fmt:formatNumber value="${repStoreInOutForm.CIF_INV_MONEY}"
type="currency" maxFractionDigits="2" minFractionDigits="2"></fmt:formatNumber>
</ec:column>
</ec:row>
</ec:table>

后台JAVA代码如下:

public List getRepStoreInOuts()
{
//1,设置查询条件
repStoreInOut.setSedate( DateUtil.getDateTime( "yyyy-MM-dd", edate ) );
repStoreInOut.setItemC( itmc );
repStoreInOut.setItemCn( itm );
repStoreInOut.setEntC( sysUser.getSuEntC() );
//设置会计期间
repStoreInOut.setAccount( account );

//2, 当列表的分页,过滤,排序等操作是基于数据库的,必须使用LIMIT对象
Limit limit = RequestUtils.getLimit( getRequest() );

//基于数据库的排序
Sort sort = limit.getSort();
Map sortMap = sort.getSortValueMap();
if( sortMap != null && sortMap.size() > 0 )
{
Set keySet = sortMap.keySet();
Iterator keyIterator = keySet.iterator();
String order = ( String )keyIterator.next();
repStoreInOut.setOrder( order );
Iterator iterator = sortMap.values().iterator();
String desc = ( String )iterator.next();
repStoreInOut.setDesc( desc );
}

//基于数据库的过滤
FilterSet filterSet = limit.getFilterSet();
Map filterPropertyMap = filterSet.getPropertyValueMap();

//不需要重复计算总行数
int totalRows = RequestUtils.getTotalRowsFromRequest( getRequest() );
if( totalRows < 0 )
{
//取得记录总条数时,不要忘了把filter作为参数传入,因为要取得的总行数也是要接受条件限制的.
totalRows = repStoreInOutManager.getRepStoreInOutCount( repStoreInOut );
}

//设置每页的默认设置
limit.setRowAttributes( totalRows, DEFAULT_PAGE_SIZE );

//取得当前要查询的页面起止号
int offset = 0;
int[] rowStartEnd = new int[] { limit.getRowStart() + offset, limit.getRowEnd() + offset };
repStoreInOut.setBegin( rowStartEnd[ 0 ] );
repStoreInOut.setEnd( rowStartEnd[ 1 ] );

List result = repStoreInOutManager.getRepStoreInOuts( repStoreInOut );

return result;
}
}
...全文
932 32 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
32 条回复
切换为时间正序
请发表友善的回复…
发表回复
seffxu3 2011-02-11
  • 打赏
  • 举报
回复
缺少htmlpaser.jar
nec_8899 2008-06-23
  • 打赏
  • 举报
回复
Landor2004 2008-06-12
  • 打赏
  • 举报
回复
action="${pageContext.request.contextPath}/vpm/rep/repStoreInOut.html"

order by 或者导出的时候,应该靠他重新发送请求吧,但你是把请求发送给哪去了

你得再调用action呀
  • 打赏
  • 举报
回复
读的代码
Landor2004 2008-06-12
  • 打赏
  • 举报
回复
action="${pageContext.request.contextPath}/vpm/rep/repStoreInOut.html"


这是什么,怎么连接到html去了
yami251139 2008-06-08
  • 打赏
  • 举报
回复
(^#$(@*^%(@#^%
你的io呢。。。或者说读取的代码呢?
你不会以为拍完续,他自己会读出来的吧。。。

67,549

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧