Sqlstringfirma = "select * from gi_kunden.tbl_firma" I changed the code from VBA code to fetch data from Mysql DB in Mac Excel 2011 and adapted it to the following: Sub SqlConnection() Add(SourceType:=0, Source:=strConn, LinkSource:=True, Destination:=ActiveWorkbook.Sheets("Person").Range("A2")).QueryTable 'Get an error hereĪlso tried the following code: strConn = "Provider=SQLNCLI10 " & _ Add(SourceType:=0, Source:=strConn, LinkSource:=True, Destination:=ActiveWorkbook.Sheets("Firma").Range("A2")).QueryTable 'Get an error here StrConn = "ODBC DSN=" & strSRV & " UID=" & sqlLogin & " PWD=" & sqlPW & " Database=gi_kunden" I downloaded the actualtech odbc driver and setup my dsn (not sure if I did it right though, couldn't find how to do it with a sql-server on a homepage). I couldn't find a way to establish a connection to that database. This has to be done through VBA as later I want to read as well as write data to the database. I'm trying to connect my Excel Workbook to a sql-database. I'm working on Mac OS X Yosemite with MS Office 2011.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |