-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathExcel.Read.cs
More file actions
executable file
·43 lines (40 loc) · 901 Bytes
/
Excel.Read.cs
File metadata and controls
executable file
·43 lines (40 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*----------------------------------------------------------------
// Copyright (C) 2015 广州,Lucky Game
//
// 模块名:
// 创建者:D.S.Qiu
// 修改者列表:
// 创建日期:June 03 2016
// 模块描述:
//----------------------------------------------------------------*/
namespace PureExcel
{
public partial class Excel
{
public Worksheet Read(int sheetIndex)
{
//excel index begin from 1
foreach (Worksheet workSheet in WorkSheets)
{
if (workSheet.Index == sheetIndex + 1)
{
workSheet.Read ();
return workSheet;
}
}
return null;
}
public Worksheet Read(string sheetName)
{
foreach (Worksheet workSheet in WorkSheets)
{
if (workSheet.Name == sheetName)
{
workSheet.Read ();
return workSheet;
}
}
return null;
}
}
}