Exactly what do you mean when you say neither worked?path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location)This returns the full path to the directory that contains your assembly dll. If the config file is in this same directory then all you need to do is append the filename to this path.
Private Function GetAppPath() As String Dim path As String path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly.Location) Return path End Function
Dim m_sConn1 As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & GetAppPath() & "\" & inDist & ".xlsx;;Extended Properties=""Excel 12.0 Xml;HDR=Yes""" Dim ExcelConnection As New System.Data.OleDb.OleDbConnection(m_sConn1) ExcelConnection.Open()
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.