System.Data.OleDb.OleDbException (0x80004005): Unspecified error at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open()
string strPath = @"D:\inetpub\wwwroot\cfxTemp\BuildingScorecardTemplate2014321115842072920729.xlsx" if (!File.Exists(strPath)) { file.SaveAs(strPath, true); } string strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strPath + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=1;FMT=Delimited\""; string worksheetName = ""; OleDbConnection conn = new OleDbConnection(strConn); conn.Open(); DataTable dtNew; dtNew = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); conn.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)