在ADSP中配置Excel作为数据源二(组图)
2008-01-05 10:26:13 来源:WEB开发网核心提示:数据源已经建好,6.测试打开测试视图输入两个参数,在ADSP中配置Excel作为数据源二(组图),就getExcel的两个参数,第一个参数是文件名,就可以在其它java程序中直接使用了,其步骤如下:4.1添加DataService控件4.2 创建方法4.3 控件生成Data Service控件生成后就可以类似使用其它控
数据源已经建好。
6.测试
打开测试视图
输入两个参数,就getExcel的两个参数,第一个参数是文件名,第二个参数是sheet名,
输入:x1: c:\BEA\weblogic81\samples\liquiddata\EvalGuide\excel\test.xls
x2:Customers (要区分大小)
执行测试,
测试成功。
7.编译发布数据源。
然后编译整个应用程序,发布Data Service
发布成功可以在ldconsole里查看:
在BMP中测试Data Service
Data Service发布后,就可以在其它java程序中直接使用了。其步骤如下:
4.1添加DataService控件
4.2 创建方法
4.3 控件生成
Data Service控件生成后就可以类似使用其它控件一样方便的使用了。
4.4 使用BMP测试
BMP流程如下:
部署应用程序,开始测试:
返回xml为:
<exc:excel xmlns:exc="http://www.bea.com/excel">
<cells>
<cell cellID="AAAA:0001">Customer ID</cell>
<cell cellID="AAAB:0001">Customer name</cell>
<cell cellID="AAAC:0001">City</cell>
<cell cellID="AAAD:0001">Sales People ID</cell>
<cell cellID="AAAA:0002">2001.0</cell>
<cell cellID="AAAB:0002">Hoffman</cell>
<cell cellID="AAAC:0002">London</cell>
<cell cellID="AAAD:0002">1001.0</cell>
<cell cellID="AAAA:0003">2002.0</cell>
<cell cellID="AAAB:0003">Alex</cell>
<cell cellID="AAAC:0003">Rome</cell>
<cell cellID="AAAD:0003">1003.0</cell>
<cell cellID="AAAA:0004">2003.0</cell>
<cell cellID="AAAB:0004">Liu</cell>
<cell cellID="AAAC:0004">San Jose</cell>
<cell cellID="AAAD:0004">1002.0</cell>
<cell cellID="AAAA:0005">2004.0</cell>
<cell cellID="AAAB:0005">Grass</cell>
<cell cellID="AAAC:0005">Berlin</cell>
<cell cellID="AAAD:0005">1002.0</cell>
<cell cellID="AAAA:0006">2006.0</cell>
<cell cellID="AAAB:0006">Clements</cell>
<cell cellID="AAAC:0006">London</cell>
<cell cellID="AAAD:0006">1001.0</cell>
<cell cellID="AAAA:0007">2008.0</cell>
<cell cellID="AAAB:0007">CisNeros</cell>
<cell cellID="AAAC:0007">San Jose</cell>
<cell cellID="AAAD:0007">1007.0</cell>
<cell cellID="AAAA:0008">2007.0</cell>
<cell cellID="AAAB:0008">Pereira</cell>
<cell cellID="AAAC:0008">Rome</cell>
<cell cellID="AAAD:0008">1004.0</cell>
<cell cellID="AAAA:0009">14031.0</cell>
<cell cellID="AAAB:0009"/>
<cell cellID="AAAC:0009"/>
<cell cellID="AAAD:0009"/>
<cell cellID="AAAA:0010"/>
<cell cellID="AAAB:0010"/>
<cell cellID="AAAC:0010"/>
<cell cellID="AAAD:0010"/>
<cell cellID="AAAA:0011">Amount of customer</cell>
<cell cellID="AAAB:0011"/>
<cell cellID="AAAC:0011">7.0</cell>
<cell cellID="AAAD:0011"/>
<cell cellID="AAAA:0012">Minimum of rating</cell>
<cell cellID="AAAB:0012"/>
<cell cellID="AAAC:0012">1001.0</cell>
<cell cellID="AAAD:0012"/>
<cell cellID="AAAA:0013">Maximum of rating</cell>
<cell cellID="AAAB:0013"/>
<cell cellID="AAAC:0013">1007.0</cell>
<cell cellID="AAAD:0013"/>
<cell cellID="AAAA:0014">Average of rating</cell>
<cell cellID="AAAB:0014"/>
<cell cellID="AAAC:0014">1002.8571428571429</cell>
<cell cellID="AAAD:0014"/>
<cell cellID="AAAA:0015"/>
<cell cellID="AAAB:0015"/>
<cell cellID="AAAC:0015"/>
<cell cellID="AAAD:0015"/>
</cells>
<row rowID="0001" rowNumber="1">
<col columnID="AAAA" columnName="A">Customer ID</col>
<col columnID="AAAB" columnName="B">Customer name</col>
<col columnID="AAAC" columnName="C">City</col>
<col columnID="AAAD" columnName="D">Sales People ID</col>
</row>
<row rowID="0002" rowNumber="2">
<col columnID="AAAA" columnName="A">2001.0</col>
<col columnID="AAAB" columnName="B">Hoffman</col>
<col columnID="AAAC" columnName="C">London</col>
<col columnID="AAAD" columnName="D">1001.0</col>
</row>
<row rowID="0003" rowNumber="3">
<col columnID="AAAA" columnName="A">2002.0</col>
<col columnID="AAAB" columnName="B">Alex</col>
<col columnID="AAAC" columnName="C">Rome</col>
<col columnID="AAAD" columnName="D">1003.0</col>
</row>
<row rowID="0004" rowNumber="4">
<col columnID="AAAA" columnName="A">2003.0</col>
<col columnID="AAAB" columnName="B">Liu</col>
<col columnID="AAAC" columnName="C">San Jose</col>
<col columnID="AAAD" columnName="D">1002.0</col>
</row>
<row rowID="0005" rowNumber="5">
<col columnID="AAAA" columnName="A">2004.0</col>
<col columnID="AAAB" columnName="B">Grass</col>
<col columnID="AAAC" columnName="C">Berlin</col>
<col columnID="AAAD" columnName="D">1002.0</col>
</row>
<row rowID="0006" rowNumber="6">
<col columnID="AAAA" columnName="A">2006.0</col>
<col columnID="AAAB" columnName="B">Clements</col>
<col columnID="AAAC" columnName="C">London</col>
<col columnID="AAAD" columnName="D">1001.0</col>
</row>
<row rowID="0007" rowNumber="7">
<col columnID="AAAA" columnName="A">2008.0</col>
<col columnID="AAAB" columnName="B">Cisneros</col>
<col columnID="AAAC" columnName="C">San Jose</col>
<col columnID="AAAD" columnName="D">1007.0</col>
</row>
<row rowID="0008" rowNumber="8">
<col columnID="AAAA" columnName="A">2007.0</col>
<col columnID="AAAB" columnName="B">Pereira</col>
<col columnID="AAAC" columnName="C">Rome</col>
<col columnID="AAAD" columnName="D">1004.0</col>
</row>
<row rowID="0009" rowNumber="9">
<col columnID="AAAA" columnName="A">14031.0</col>
<col columnID="AAAB" columnName="B"/>
<col columnID="AAAC" columnName="C"/>
<col columnID="AAAD" columnName="D"/>
</row>
<row rowID="0010" rowNumber="10">
<col columnID="AAAA" columnName="A"/>
<col columnID="AAAB" columnName="B"/>
<col columnID="AAAC" columnName="C"/>
<col columnID="AAAD" columnName="D"/>
</row>
<row rowID="0011" rowNumber="11">
<col columnID="AAAA" columnName="A">Amount of customer</col>
<col columnID="AAAB" columnName="B"/>
<col columnID="AAAC" columnName="C">7.0</col>
<col columnID="AAAD" columnName="D"/>
</row>
<row rowID="0012" rowNumber="12">
<col columnID="AAAA" columnName="A">Minimum of rating</col>
<col columnID="AAAB" columnName="B"/>
<col columnID="AAAC" columnName="C">1001.0</col>
<col columnID="AAAD" columnName="D"/>
</row>
<row rowID="0013" rowNumber="13">
<col columnID="AAAA" columnName="A">Maximum of rating</col>
<col columnID="AAAB" columnName="B"/>
<col columnID="AAAC" columnName="C">1007.0</col>
<col columnID="AAAD" columnName="D"/>
</row>
<row rowID="0014" rowNumber="14">
<col columnID="AAAA" columnName="A">Average of rating</col>
<col columnID="AAAB" columnName="B"/>
<col columnID="AAAC" columnName="C">1002.8571428571429</col>
<col columnID="AAAD" columnName="D"/>
</row>
<row rowID="0015" rowNumber="15">
<col columnID="AAAA" columnName="A"/>
<col columnID="AAAB" columnName="B"/>
<col columnID="AAAC" columnName="C"/>
<col columnID="AAAD" columnName="D"/>
</row>
</exc:excel>
[]
- ››Excel 2010:用数据透视表对数据立体化分析
- ››Excel 2010:数据分析透视图的用法
- ››Excel 2010:简洁实用的迷你图
- ››Excel 2010:快速分析数据之数据条
- ››Excel 2010:快速创建丰富的数据图表
- ››Excel 2010:动态洞察数据的切片器
- ››Excel 2010:使用数据透视表对数据进行立体化分析...
- ››Excel 2010:将数据分析结果分页显示
- ››Excel 2010:数据分析透视图
- ››Excel 2010:快速分析数据之图标集
- ››Excel 2010:快速标注数据表中的前3名数据
- ››Excel 2010:便捷的打印工作表选项
更多精彩
赞助商链接