Excel Data Connection to Active Directory [closed]
I want to create a data connection in excel-2007 that pulls the result of an active-directory query into a sheet in my workbook.
I see that I can do this with VBA but I agree with Rob here that it should be easier than that, just using "OLE DB Provider for Microsoft Directory Services"
A bit of googling suggests that this is a hole in our collective knowledge that deserves 开发者_C百科to be filled!
After 4 hours trial & error, I gave up and did the AD stuff on the SQL-side, using
SELECT * FROM OPENQUERY(MyActiveDirectoryLinkedServer, 'SELECT ... FROM ''LDAP://...'' WHERE ...')
But this requires a linked server to be set up, which is against DBA best practice. Luckily in my case I had one already. ;)
精彩评论