I want to connect to a mongodb database using excel macros, does anybody knows how to acomplish this task?
+2
A:
Simple way is
- create a C# dll to interact with Mongo db through available c# drivers.
- Make it Com visible (in Assemblyinfo.cs), build it and register it
- Go to the excel macro - > visual basic editor
- Click tools->reference, and select your registered assembly
- And use it in your VBA, like this.
.
Private Sub CallMongo()
Dim mongoObj As New MyMongoAssembly
mongoObj.AddItem("adas");
End Sub
thats all..
Cheers
Ramesh Vel
2010-10-29 11:17:57