/*
* 读取Excel文档中的数据
* @return List
* @throws DAOException
*/
private List readEXL(String filepath, String autoId) throws DAOException {
List result = new ArrayList();
//将单元格的值设置到VO中
vo = new ProductVO();
vo.setProduct_id(productId);
vo.setType_name(getCellValue(cell_type_name));
vo.setChn_name(getCellValue(cell_client_name));
vo.setPrice_name(getCellValue(cell_price_name));
vo.setEncap_name(getCellValue(cell_encap_name));
vo.setManufacture_name(getCellValue(cell_manufacture_name));
vo.setNumber(getCellValue(cell_number));
vo.setDescription(getCellValue(cell_description));
vo.setBatch_name(getCellValue(cell_batch_name));
//获得进价的类型
int priceType = cell_in_price.getCellType();
String priceValue;
//但不为空时进价类型为数字型
if (priceType == 0) {
//获得单元格的值
priceValue = String.valueOf(cell_in_price.getNumericCellValue());
//如果整数位的长度大于7时,获得的值是用科学计数法表示的
int indexOfE = priceValue.indexOf("E");
//如果位科学计数法,则转换位普通形式
if (indexOfE > 0) {
//获得单元格值的长度
int len = priceValue.length();
//获得指数,即E后面的值
int exponent = Integer.parseInt(priceValue.substring(indexOfE +
1, len));