Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shouzhouServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjinjing
shouzhouServer
Commits
cd158fc6
Commit
cd158fc6
authored
Jul 02, 2024
by
Leo Zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了错误处理
parent
848ebb20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dataExtractor.ts
src/util/dataExtractor.ts
+2
-2
No files found.
src/util/dataExtractor.ts
View file @
cd158fc6
...
@@ -44,11 +44,11 @@ export class DataExtractor {
...
@@ -44,11 +44,11 @@ export class DataExtractor {
public
getData
(
fileName
:
string
,
sheetName
:
string
):
any
{
public
getData
(
fileName
:
string
,
sheetName
:
string
):
any
{
const
fileData
=
this
.
data
[
fileName
];
const
fileData
=
this
.
data
[
fileName
];
if
(
!
fileData
)
{
if
(
!
fileData
)
{
throw
new
Error
(
`
File
${
fileName
}
not found
`
);
throw
new
Error
(
`
Excel文件不存在
`
);
}
}
const
sheetData
=
fileData
[
sheetName
];
const
sheetData
=
fileData
[
sheetName
];
if
(
!
sheetData
)
{
if
(
!
sheetData
)
{
throw
new
Error
(
`
Sheet
${
sheetName
}
not found in file
${
fileName
}
`
);
throw
new
Error
(
`
表格不存在
`
);
}
}
return
sheetData
;
return
sheetData
;
}
}
...
...
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