java中导入excel判断03还是07

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

           InputStream inp = new FileInputStream(path);
	if(! inp.markSupported()) {
	inp = new PushbackInputStream(inp, 8);
	}
	if(POIFSFileSystem.hasPOIFSHeader(inp)) {
	System.out.println("2003及以下");
	}
	if(POIXMLDocument.hasOOXMLHeader(inp)) {
	System.out.println("2007及以上");
	}

转载于:https://my.oschina.net/u/1054538/blog/727692

你可能感兴趣的:(java中导入excel判断03还是07)