IP2Location Excel Add-In
========================

IP2Location Excel Add-In is a free add-in that enables end-users to detect country, region, city, latitude, longitude, ZIP code, ISP, domain name, 
time zone, connection speed, IDD code, area code, weather station code, weather station name, MCC, MNC, mobile brand name, elevation, and usage type by 
using an IP address as input parameter. It is using IP2Location BIN database as internal lookup reference and IP2Location ActiveX component as lookup engine. 
It does not required external network connection. The IP2Location ActiveX component with BIN database is available separately as an open source project.

Last Edited Date: 2020-07-21

REVISIONS
  Version 1.0
    * Initial release of the IP2Location Excel Add-In.

  Version 1.0.1
    * Added support for Excel 2016/2019.

  Version 1.0.2
    * Added support for TLS 1.2 protocol.

  Version 1.1.0
    * Modified to use open source IP2Location ActiveX and LITE DB1.


DEPENDENCIES

1) .NET Framework 4.6.1 or later
3) BIN database; free LITE BIN files can be downloaded at https://lite.ip2location.com/ or download commercial ones from https://www.ip2location.com/


SUPPORTED MICROSOFT OFFICE VERSION

1) Microsoft Office 2007 (Microsoft Windows only)
2) Microsoft Office 2010 (Microsoft Windows only)
3) Microsoft Office 2013 (Microsoft Windows only)
4) Microsoft Office 2016 (Microsoft Windows only)
5) Microsoft Office 2019 (Microsoft Windows only)


INSTALLATION

1) Make sure you have closed all open Excel Windows before continuing to the next step.
2) Create a new folder, e.g. C:\IP2LocationXLAM or anything you want.
3) Copy the IP2Location.xlam and both setup_x86.exe & setup_x64.exe to the Step 1 folder.
4) Open the folder that you have created in Step 1.
5) Right-click on the setup_x86.exe file that you have copied in Step 2 and click on "Run as administrator".
6) When it is done, you can press any key to continue.
7) If you see "Error: Please run the other setup file. This setup file is not correct for your system." then repeat Step 5 but with the setup_x64.exe file.
8) If you see any other error messages, just try running that same setup file again.
9) If error persists, take a screenshot of the error and email to support@ip2location.com for assistance.


CONFIGURATION SETTINGS

1) If you have purchased the premium BIN database file, copy it to the same folder that you have created above.
2) Double-click on the CONFIG.TXT in the above folder to open it in a text editor like Notepad.
3) Edit the first line to be the full path to your premium BIN database file. (or any other sample or LITE BIN files you may have downloaded)
4) Save the file and close it.

Your installation is now complete.


USAGE EXAMPLE

1) Open a new Excel worksheet.
2) In cell A1, type 8.8.8.8 and in cell B1, type =IP2Location_CountryLong(A1)
3) You should now see the B1 cell show UNITED STATES.


AVAILABLE FUNCTIONS

IP2Location_AreaCode(strIP)
  Return value: A varying length number assigned to geographic areas for calls between cities.

IP2Location_City(strIP)
  Return value: City name.
  
IP2Location_CountryLong(strIP)
  Return value: Country name based on ISO 3166.
  
IP2Location_CountryShort(strIP)
  Return value: Two-character country code based on ISO 3166.
  
IP2Location_Domain(strIP)
  Return value: Internet domain name associated with that IP address range.
  
IP2Location_Elevation(strIP)
  Return value: The elevation of the city in meters.
  
IP2Location_IDDCode(strIP)
  Return value: The IDD prefix to call the city from another country.
  
IP2Location_ISP(strIP)
  Return value: Internet Service Provider (ISP) name.
  
IP2Location_Latitude(strIP)
  Return value: City latitude.
  
IP2Location_Longitude(strIP)
  Return value: City longitude.
  
IP2Location_MCC(strIP)
  Return value: Mobile country code.
  
IP2Location_MNC(strIP)
  Return value: Mobile network code.
  
IP2Location_MobileBrand(strIP)
  Return value: Mobile brand.
  
IP2Location_NetSpeed(strIP)
  Return value: Connection speed.
  
IP2Location_Region(strIP)
  Return value: Region or state name.
  
IP2Location_TimeZone(strIP)
  Return value: Time zone of the city.
  
IP2Location_UsageType(strIP)
  Return value: Usage type of ISP or organization.
  
IP2Location_WeatherStationCode(strIP)
  Return value: Special code to identify the nearest weather observation station.
  
IP2Location_WeatherStationName(strIP)
  Return value: Name of the nearest weather observation station.
  
IP2Location_ZIPCode(strIP)
  Return value: ZIP code.


IMPORTANT NOTES

If you are having problems getting the Add-In to work, please make sure your Excel security settings are configured to allow the Add-In to work.

Open a blank Excel worksheet, then click on FILE -> Options -> Trust Center.

Click on Trust Center Settings.

Under Add-ins, make sure "Require Application Add-ins to be signed by Trusted Publisher" is unchecked.
Make sure "Disable all Application Add-ins" is unchecked.

Under ActiveX Settings, make sure "Prompt me before enabling all controls with minimal restrictions" is selected.

Under Protected View, make sure "Enable Protected View for files originating from the Internet" is unchecked.

Under File Block Settings, for the file type "Excel Add-in Files", make sure everything is unchecked.
