??xml version="1.0" encoding="utf-8" standalone="yes"?>97国产成人高清在线观看,亚洲国产精品成人一区二区,国产精品欧美久久久久一区二区http://www.aygfsteel.com/spinage/zh-cnThu, 19 Jun 2025 00:56:26 GMTThu, 19 Jun 2025 00:56:26 GMT60使用POI3.5Ӟ兼容Excel2007而发生的异常http://www.aygfsteel.com/spinage/archive/2011/03/16/346409.htmlspinagespinageWed, 16 Mar 2011 08:17:00 GMThttp://www.aygfsteel.com/spinage/archive/2011/03/16/346409.htmlhttp://www.aygfsteel.com/spinage/comments/346409.htmlhttp://www.aygfsteel.com/spinage/archive/2011/03/16/346409.html#Feedback1http://www.aygfsteel.com/spinage/comments/commentRss/346409.htmlhttp://www.aygfsteel.com/spinage/services/trackbacks/346409.html
org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. You are calling the part of POI that deals with OLE2 Office Documents. You need to call a different part of POI to process this data (eg XSSF instead of HSSF)
该错误意思是_(d)文g中的数据是用Office2007+XML保存的,而现在却调用OLE2 Office文档处理Q应该用POI不同的部分来处理q些数据Q比如用XSSF来代替HSSF?br />
于是按提CZ用XSSF代替HSSFQ用new XSSFWorkbook(excelFile)来读取WorkbookQ对Excel2007没有问题了,可是在读取Excel2003以前Q包?003Q的版本时却发生了如下新异常Q真是太(zhn)剧了)(j)Q?br />
org.apache.poi.openxml4j.exceptions.InvalidOperationException: Can't open the specified file: '*.xls'
该错误是_(d)操作无效Q不能打开指定的xls文g?br />
下蝲POI的源码后q行单步调试Q发现刚开始的时候还是对的,但到ZipFilecd找不到文g了,到网上查了下Q原来是XSSF不能dExcel2003以前Q包?003Q的版本Q这L(fng)话,需要在d前判断文件是2003前的版本q是2007的版本,然后对应调用HSSF或XSSF来读取?br />
q是初步的想法,但这U做法比较麻?ch),看了下APIQ发现XSSF和HSSF虽然在不同的包里Q但却引用了同一接口WorkbookQ于是想Cq样的读取方法:(x)
Workbook book = null;
try {
book = new XSSFWorkbook(excelFile);
} catch (Exception ex) {
book = new HSSFWorkbook(new FileInputStream(excelFile));
}
在各版本的Excel中测试,没有发生异常Q问题解冟?
oracle 不走索引的几U情?/title>http://www.aygfsteel.com/spinage/archive/2010/01/14/309461.htmlspinagespinageThu, 14 Jan 2010 07:16:00 GMThttp://www.aygfsteel.com/spinage/archive/2010/01/14/309461.htmlhttp://www.aygfsteel.com/spinage/comments/309461.htmlhttp://www.aygfsteel.com/spinage/archive/2010/01/14/309461.html#Feedback0http://www.aygfsteel.com/spinage/comments/commentRss/309461.htmlhttp://www.aygfsteel.com/spinage/services/trackbacks/309461.html
1、徏立组合烦(ch)引,但查询谓词ƈ未用组合烦(ch)引的W一列,此处有一个INDEX SKIP SCAN概念?
2、在包含有null值的table列上建立索引Q当时用select count(*) from table时不?x)用?ch)引?
3、在索引列上使用函数时不?x)用?ch)引,如果一定要使用索引只能建立函数索引?
4、当被烦(ch)引的列进行隐式的cd转换时不?x)用?ch)引。如:select * from t where indexed_column = 5Q而indexed_column列徏立烦(ch)引但cd是字W型Q这时Oracle?x)?
隐式的类型{换,转换后的语句cM于select * from t where to_number(indexed_column) = 5Q此时不走烦(ch)引的情况cM于case3。日期{换也有类似问题,?
select * from t where trunc(date_col) = trunc(sysdate)其中date_col为烦(ch)引列Q这样写不会(x)走烦(ch)引,可改写成select * from t where date_col >= trunc(sysdate)
and date_col < trunc(sysdate+1)Q此查询?x)走索引?
5、ƈ不是所有情况用烦(ch)引都?x)加快查询速度Qfull scan table 有时?x)更快,其是当查询的数据量占整个表的比重较大时Q因为full scan table采用的是多块读,
当Oracle优化器没有选择使用索引时不要立卛_制用,要充分证明用烦(ch)引确实查询更快时再用强制烦(ch)引?