Commit 36fdc579 authored by 张永's avatar 张永

加个方法

parent a1b09fa2
...@@ -1106,4 +1106,35 @@ public class StringUtil { ...@@ -1106,4 +1106,35 @@ public class StringUtil {
return Hex.encodeHexString(bytes); return Hex.encodeHexString(bytes);
} }
/**
*
* @描述:是否是2003的excel,返回true是2003
*
*
* @参数:@param filePath 文件完整路径
*
* @参数:@return
*
* @返回值:boolean
*/
public static boolean isExcel2003(String filePath){
return filePath.matches("^.+\\.(?i)(xls)$");
}
/**
*
* @描述:是否是2007的excel,返回true是2007
*
*
* @参数:@param filePath 文件完整路径
*
* @参数:@return
*
* @返回值:boolean
*/
public static boolean isExcel2007(String filePath){
return filePath.matches("^.+\\.(?i)(xlsx)$");
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment