Пример #1
0
 /// <param name="fileName">Full path to the Excel spreadsheet</param>
 /// <param name="createPersistentConnection">If <c>true</c>, a connection will be created and shared for the lifetime of the factory. If <c>false</c>, a connection will be created and disposed for each query operation (default)</param>
 public ExcelQueryFactory(string fileName, bool createPersistentConnection) : this(fileName)
 {
     if (createPersistentConnection)
     {
         _persistentConnection = new OleDbConnection(ExcelUtilities.GetConnectionString(new ExcelQueryArgs
         {
             DatabaseEngine = DatabaseEngine,
             FileName       = fileName,
             NoHeader       = true
         }));
     }
 }