代码如下: public partial class ExcelHelper : IDisposable { #region Fileds private string _excelObject = “Provider=Microsoft.{0}.OLEDB.{1};Data Source={2};Extended Properties=\”Excel {3};HDR={4};IMEX={5}\””; private string _filepath = string.Empty; private string _hdr = “No”; private string _imex = “1”;