mirror of https://gitee.com/y_project/RuoYi.git
直接在字符串前加tab字符,不用正则匹配,以提高excel导出性能
Signed-off-by: 寄叶 <10877674+LiRui176@user.noreply.gitee.com>pull/460/head
parent
b36ba5a16c
commit
9251d72c0d
|
@ -915,7 +915,7 @@ public class ExcelUtil<T>
|
|||
// 对于任何以表达式触发字符 =-+@开头的单元格,直接使用tab字符作为前缀,防止CSV注入。
|
||||
if (StringUtils.startsWithAny(cellValue, FORMULA_STR))
|
||||
{
|
||||
cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0");
|
||||
cellValue = "\t" + cellValue;
|
||||
}
|
||||
if (value instanceof Collection && StringUtils.equals("[]", cellValue))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue