Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
bltdc
data-center-auto
Commits
f95437a6
Commit
f95437a6
authored
Apr 21, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导入优化
parent
20b71dbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
3 deletions
+27
-3
EPPlusHelper.cs
AutoTurnOver.Utility/EPPlusHelper.cs
+27
-3
No files found.
AutoTurnOver.Utility/EPPlusHelper.cs
View file @
f95437a6
...
@@ -83,7 +83,11 @@ namespace AutoTurnOver.Utility
...
@@ -83,7 +83,11 @@ namespace AutoTurnOver.Utility
int
col
=
workSheet
.
Dimension
.
Columns
;
int
col
=
workSheet
.
Dimension
.
Columns
;
for
(
int
j
=
1
;
j
<=
col
;
j
++)
for
(
int
j
=
1
;
j
<=
col
;
j
++)
{
{
table
.
Columns
.
Add
(
workSheet
.
Cells
[
1
,
j
].
Value
.
ToString
());
if
(
workSheet
.
Cells
[
1
,
j
]
!=
null
&&
workSheet
.
Cells
[
1
,
j
].
Value
!=
null
)
{
table
.
Columns
.
Add
(
workSheet
.
Cells
[
1
,
j
].
Value
.
ToString
());
}
}
}
for
(
int
i
=
2
;
i
<=
row
;
i
++)
for
(
int
i
=
2
;
i
<=
row
;
i
++)
{
{
...
@@ -92,11 +96,31 @@ namespace AutoTurnOver.Utility
...
@@ -92,11 +96,31 @@ namespace AutoTurnOver.Utility
{
{
try
try
{
{
data_row
[
workSheet
.
Cells
[
1
,
j
].
Value
.
ToString
()]
=
workSheet
.
Cells
[
i
,
j
].
Value
==
null
?
""
:
workSheet
.
Cells
[
i
,
j
].
Value
.
ToString
();
var
cell
=
workSheet
.
Cells
[
i
,
j
];
if
(
workSheet
.
Cells
[
1
,
j
]
!=
null
&&
workSheet
.
Cells
[
1
,
j
].
Value
!=
null
)
{
if
(
workSheet
.
Cells
[
i
,
j
]
!=
null
&&
workSheet
.
Cells
[
i
,
j
].
Value
!=
null
)
{
if
(
cell
.
Style
.
Numberformat
.
Format
.
IndexOf
(
"yyyy"
)
>
-
1
||
(
cell
.
Style
.
Numberformat
.
Format
.
IndexOf
(
"月"
)
>
-
1
&&
cell
.
Style
.
Numberformat
.
Format
.
IndexOf
(
"日"
)
>
-
1
))
{
data_row
[
workSheet
.
Cells
[
1
,
j
].
Value
.
ToString
()]
=
cell
.
GetValue
<
DateTime
>();
}
else
{
data_row
[
workSheet
.
Cells
[
1
,
j
].
Value
.
ToString
()]
=
cell
.
Value
;
}
}
else
{
data_row
[
workSheet
.
Cells
[
1
,
j
].
Value
.
ToString
()]
=
""
;
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
throw
;
throw
;
}
}
...
...
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