Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
relation
Commits
02f71096
Commit
02f71096
authored
Aug 20, 2025
by
wujipeng
Browse files
文件解析处理
parent
d39b7ed4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/platform/service/impl/AnalysisServiceImpl.java
View file @
02f71096
...
@@ -432,9 +432,17 @@ public class AnalysisServiceImpl implements AnalysisService {
...
@@ -432,9 +432,17 @@ public class AnalysisServiceImpl implements AnalysisService {
String
fileName
=
excelFile
.
getName
().
toLowerCase
();
String
fileName
=
excelFile
.
getName
().
toLowerCase
();
if
(
fileName
.
endsWith
(
".xlsx"
))
{
if
(
fileName
.
endsWith
(
".xlsx"
))
{
return
new
XSSFWorkbook
(
new
FileInputStream
(
excelFile
));
try
{
return
new
XSSFWorkbook
(
new
FileInputStream
(
excelFile
));
}
catch
(
Exception
e
)
{
return
new
HSSFWorkbook
(
new
FileInputStream
(
excelFile
));
}
}
else
if
(
fileName
.
endsWith
(
".xls"
))
{
}
else
if
(
fileName
.
endsWith
(
".xls"
))
{
return
new
HSSFWorkbook
(
new
FileInputStream
(
excelFile
));
try
{
return
new
HSSFWorkbook
(
new
FileInputStream
(
excelFile
));
}
catch
(
Exception
e
)
{
return
new
XSSFWorkbook
(
new
FileInputStream
(
excelFile
));
}
}
else
{
}
else
{
throw
new
IllegalArgumentException
(
"不支持的Excel文件格式"
);
throw
new
IllegalArgumentException
(
"不支持的Excel文件格式"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment