Reputation: 73
We are creating an excel plugin but need some guidance as we're new to excel development (but not new to programming).
Here's what we want: Once the user installs the plugin, they will authenticate w/ our server to ensure they are a subscriber to our service (the plugin will save login info and password so they don't have to enter credentials everytime). From there, the user will be able to type in custom formulas (UDFs) in Excel and pull data from our mysql database.
Here's what we've tried:
We started w/ VisualStudio (C#) and got excel to output some mysql data when the spreadsheet starts up. Looking into it further, people have suggested to use ExcelDNA to create UDF's. So, we did some reading on ExcelDNA and have created a helloworld xll but haven't been able to find anything on how to authenticate the user. Should we be using ExcelDNA? VisualStudio? Something entirely different? thx!
Upvotes: 0
Views: 375
Reputation: 16907
Excel-DNA is exactly right library to use (I'm the developer, but still...).
You would probably use Visual Studio as your IDE to make the .NET assembly with functions and macros in. But your .NET .dll will be integrated into Excel using the Excel-DNA .xll instead of the Visual Studio Tools for Office (VSTO) libraries that ship with Visual Studio Professional.
Nothing in Excel-DNA (or any of the other add-in frameworks I know of) gives you a pre-built implementation of the authentication feature you ask for. But implementing it yourself should not be too hard - you'd do your check and possible username/password prompt in the AutoOpen handler of the add-in, and enable or disable the functionality based on the result from your web call. You should be a little bit careful if you are making a potentially slow web request during the add-in load...
You could also implement the log-in via ribbon interface, with an indicator of the current status and a button to log in. That way users would not be confused about why your add-in 'is not working' when the functions are disabled.
On the Excel-DNA CodePlex site http://exceldna.codeplex.com there are links to other projects based on Excel-DNA. The best place for support is the Google group at http://groups.google.com/group/exceldna. I also monitor the 'excel-dna' tag on StackOverflow, but often the group is nicer for ongoing back-and-forth discussions and explanations.
Upvotes: 1