获取活动工作表Excel

时间:2016-05-13 04:33:33

标签: asp.net excel openxml

我想使用DocumentFormat.OpenXml从excel文件中仅获取活动工作表名称,但现在我将获取所有工作表名称,如何使用DocumentFormat.OpenXml从excel获取活动工作表名称?

1 个答案:

答案 0 :(得分:1)

试试这段代码

Errors and Failures:
1) SetUp Error : Hidden.UAC.Service.IntegrationTest.TestSetUp
   SetUp : System.Security.SecurityException : The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.
   at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
   at System.Diagnostics.EventLog.SourceExists(String source, String machineName, Boolean wantToCreate)
   at Hidden.Cornerstone.Common.ApplicationManager.LogException(Exception e) in e:\Builder\TeamCity\buildAgent\work\9dbde7d05f17a8e5\Hidden.Cornerstone\Hidden.Cornerstone.Common\ApplicationManager.cs:line 99
   at Hidden.Cornerstone.Common.ApplicationManager.Initialize() in e:\Builder\TeamCity\buildAgent\work\9dbde7d05f17a8e5\Hidden.Cornerstone\Hidden.Cornerstone.Common\ApplicationManager.cs:line 91
   at Hidden.UAC.Service.IntegrationTest.TestSetUp.Init() in e:\Builder\TeamCity\buildAgent\work\9dbde7d05f17a8e5\Hidden.UAC\Hidden.UAC.Service.Impl.IntegrationTest\TestSetUp.cs:line 22