Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增NPOI对工作簿对象工作表对象的相关操作 #40

Closed
wants to merge 3 commits into from
Closed

Conversation

CN-Hang
Copy link
Contributor

@CN-Hang CN-Hang commented Sep 29, 2023

                    依赖于NPOI 2.6.2
		支持通过文件地址或者流的方式读取Excel文件获取工作簿对象IWorkbook,
		通过IWorkbook工作簿对象可以转化成Dataset对象
		通过ISheet工作表对象可以转化成DataTable对象和List对象
		以下是一些示例:
		获取数据集对象:
		var dateSet = NPOIUtil.OpenWorkbook(path).ConvertToDataSet();
		var dateSet = NPOIUtil.ConvertToDataSet(path);
		获取工作表对象:
		var sheet = NPOIUtil.OpenWorkbook(path).GetSheetAt(0);
		获取单表数据对象:
		var dataTable = NPOIUtil.OpenWorkbook(path).GetSheetAt(0).ConvertToDataTable();
		List《T》 dataList = NPOIUtil.OpenWorkbook(path).GetSheetAt(0).ConvertToList《List《T》》();
		从流读取工作簿对象(从流读取需要指定文件类型,缺省值为XLSX):
		var workbook = NPOIUtil.OpenWorkbook(stream,ExcelWorkbookType.XLS);

@CN-Hang CN-Hang closed this Sep 29, 2023
@CN-Hang
Copy link
Contributor Author

CN-Hang commented Sep 29, 2023

NPOIUtil ,依赖于NPOI 2.6.2 的帮助类

@CN-Hang CN-Hang reopened this Sep 29, 2023
@CN-Hang
Copy link
Contributor Author

CN-Hang commented Sep 29, 2023

NPOIUtil ,依赖于NPOI 2.6.2 的帮助类

@CN-Hang CN-Hang closed this Sep 29, 2023
@CN-Hang
Copy link
Contributor Author

CN-Hang commented Sep 29, 2023

NPOIUtil ,依赖于NPOI 2.6.2 的帮助类

@CN-Hang CN-Hang reopened this Sep 29, 2023
# Conflicts:
#	EasyTool.NPOITests/NPOIUtilTests.cs
#	EasyTool.sln
@CN-Hang CN-Hang closed this Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant