![]() |
||
[Back]
Calling the WoRMS webservice from Microsoft Excel XP/2003This tutorial assumes you are using any Microsoft Windows Operating System with Office XP or 2003 installedStep 1: Install the Office Web Services Toolkit for your Office version Step 2: Lauch the Web Service References Tool Launch Excel and open the Visual Basic Editor by going to the Tools->Macro-> Visual Basic Editor.
Step 3: Generate the VBA code Select the checkbox Web Service URL and enter this value: http://www.marinespecies.org/aphia.php?p=soap&wsdl=1
Add this piece of code by choosing Insert->Module. Copy this code into your Excel VBA module Option Explicit 'Excel VBA Function to call the AphiaNameService Public Function getAphiaID(taxon As String) As Single Dim aphia As New clsws_AphiaNameService getAphiaID = aphia.wsm_getAphiaID(taxon, True) End FunctionYour screen should look something like this:
Close the VB Editor. Step 3: Using the function in Excel You can now use the function getAphiaID as you would any built-in Excel function.
The result should be something like this:
Download this example. Credits for this tutorial go to Simon St.Laurent (Oreilly). |
||