forked from ExcelDataReader/ExcelDataReader
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathExcelOpenXmlReader.cs
More file actions
31 lines (26 loc) · 826 Bytes
/
Copy pathExcelOpenXmlReader.cs
File metadata and controls
31 lines (26 loc) · 826 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
using System;
using System.IO;
using ExcelDataReader.Core;
using ExcelDataReader.Core.OpenXmlFormat;
namespace ExcelDataReader
{
internal class ExcelOpenXmlReader : ExcelDataReader<XlsxWorkbook, XlsxWorksheet>
{
public ExcelOpenXmlReader(Stream stream, ExcelReaderConfiguration configuration)
: base(configuration)
{
Document = new ZipWorker(stream);
Workbook = new XlsxWorkbook(Document);
// By default, the data reader is positioned on the first result.
Reset();
}
private ZipWorker Document { get; set; }
public override void Close()
{
base.Close();
Document?.Dispose();
Workbook = null;
Document = null;
}
}
}