{"id":55,"date":"2012-01-18T18:45:55","date_gmt":"2012-01-18T18:45:55","guid":{"rendered":"http:\/\/www.haroldstreet.org.uk\/osgb\/?page_id=55"},"modified":"2025-05-21T16:05:53","modified_gmt":"2025-05-21T16:05:53","slug":"excel-conversion-code","status":"publish","type":"page","link":"https:\/\/www.haroldstreet.org.uk\/osgb\/excel-conversion-code\/","title":{"rendered":"Excel Cartographic Code"},"content":{"rendered":"<p>Routines for Microsoft Excel \u2122 are available which will perform a number of functions including:<\/p>\n<ul>\n<li>Import data from a gpx file. \u00a0These files are now the standard interchange mechanism for waypoints, routes and tracks for gps devices.<\/li>\n<li>Compact gpx data by removing duplicated or redundant points.\u00a0 Huge savings are possible without significant loss of detail.<\/li>\n<li>Export data to a gpx file for download to a gps device or for display on a mapping application.<\/li>\n<li>Generate a kml file for displaying data on Google Earth<\/li>\n<li>Give locations of postcodes\/zipcodes<\/li>\n<li>Convert between GB Ordnance Survey references, eastings and northings, WGS84 latitude and longitude, and OS datum latitude and longitude.<\/li>\n<li>Compute angular variations (true, grid or magnetic north).<\/li>\n<li>Compute range and bearing between points<\/li>\n<li>Show HELP information<\/li>\n<\/ul>\n<p>The routines are supplied in an addin.\u00a0 An examples workbook is also supplied which demonstrates the use of all the functions and also includes routines to install, remove or check the status of the addin.<\/p>\n<p>For versions of Windows <span style=\"text-decoration: underline;\"><strong>Excel 2007 or later<\/strong> <\/span>or for MAC Excel 2016\/2019 please use these.<\/p>\n<p><a title=\"Microsoft Excel Addin for OSGB - Lat\/Lon conversion code\" href=\"\/osgb\/wp-content\/uploads\/2021\/01\/osgb.xlam\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-175 size-full\" src=\"\/osgb\/wp-content\/uploads\/2012\/01\/excel_addin_icon.gif\" alt=\"Download OSGB.xlam\" width=\"50\" height=\"49\" \/><\/a><strong><a href=\"\/osgb\/wp-content\/uploads\/2021\/01\/osgb.xlam\"> &#8211; osgb.xlam<\/a><\/strong> \u2013 the addin which holds the basic code\u00a0 and \u2026<\/p>\n<p><a title=\"Microsoft Excel Examples of the OSGB - Lat\/Lon conversion code\" href=\"\/osgb\/wp-content\/uploads\/2021\/01\/OSGBExamples.xlsm\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-193 size-full\" src=\"\/osgb\/wp-content\/uploads\/2012\/01\/excel_icon.gif\" alt=\"Download OSGBExamples.xlsm\" width=\"50\" height=\"49\" \/><\/a><a href=\"\/osgb\/wp-content\/uploads\/2021\/01\/OSGBExamples.xlsm\"><strong> &#8211; osgbExamples.xlsm<\/strong><\/a> which has examples and includes an installer.<\/p>\n<p>These files have been <a href=\"https:\/\/www.haroldstreet.org.uk\/osgb\/accuracy-a-2025-update\/\">updated May 2025 &#8211; see additional details here&#8230;<\/a><\/p>\n<hr \/>\n<p>For early versions of <span style=\"text-decoration: underline;\"><strong>Excel 1997~2003<\/strong><\/span> which do not include the \u2018ribbon\u2019 interface you will need the deprecated code first published in 2012. These files have not been updated to use the Helmert transformation<\/p>\n<p><a title=\"Microsoft Excel Addin for OSGB - Lat\/Lon conversion code\" href=\"\/osgb\/wp-content\/uploads\/2013\/11\/osgb.xla\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-175\" src=\"\/osgb\/wp-content\/uploads\/2012\/01\/excel_addin_icon.gif\" alt=\"Download OSGB.xla\" width=\"50\" height=\"49\" \/><\/a> &#8211; the addin\u00a0<strong><a title=\"Microsoft Excel Addin for OSGB - Lat\/Lon conversion code\" href=\"\/osgb\/wp-content\/uploads\/2013\/11\/osgb.xla\">osgb.xla<\/a><\/strong>\u00a0which holds the code and&#8230;<\/p>\n<p><a title=\"Microsoft Excel Examples of the OSGB - Lat\/Lon conversion code\" href=\"\/osgb\/wp-content\/uploads\/2013\/11\/OSGBExamples.xls\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-193\" src=\"\/osgb\/wp-content\/uploads\/2012\/01\/excel_icon.gif\" alt=\"Download OSGBExamples.xls\" width=\"50\" height=\"49\" \/><\/a> &#8211; the example workbook <strong><a title=\"Examples of the OSGB - Lat\/Lon Excel conversion code\" href=\"\/osgb\/wp-content\/uploads\/2013\/11\/OSGBExamples.xls\">OSGBExamples.xls<\/a><\/strong>\u00a0which includes an installer for the addin.<\/p>\n<p>Download the two relevant files.<\/p>\n<p>You will need to run the example workbook, allow macros, allow it to install the addin, accept the licence conditions, then self-edit all the functions in the workbook.\u00a0 For MAC, further steps, including a simple manual one is required.<\/p>\n<p>Once installed, the addin will subsequently be available automatically to all workbooks.<\/p>\n<p>Full examples are given in the examples workbook.<\/p>\n<p>The ribbon versions have been developed under Windows\/Excel 2016 and MAC Excel 2016 and 2019.\u00a0\u00a0 The deprecated routines were developed under Excel 2003 and have been tested with (Windows) Excel 2007, Excel 2010 and Excel 2016 though the ribbon version is recommended.<\/p>\n<p>Accuracy of these routines is to a couple of metres &#8211; well within that of a consumer quality GPS, even without selective availability, well within one\u2019s ability to read a 1:25000 map, and\u00a0within the limits of stability of paper maps.<\/p>\n<p>The routines have been used by a borough in Kent for plotting their drains, have been used for microlight championships, are recommended by the British Atmospheric Data Centre, have been used by those involved in coordinating rescue services, for weather studies on Arran, butterfly studies in North Wales,\u00a0bird migration, tracking basking sharks off Western Scotland, in London bio-conservation projects and managing features on the national electricity grid!\u00a0\u00a0 I use them for plotting walks with both Garmin Basecamp and Google Earth.\u00a0 I have also received an unsolicited email from Ordnance Survey describing earlier versions of this code as a fine piece of work.<\/p>\n<p>The routines are provided \u2018as is\u2019 with no warranty.\u00a0 They are free for personal non-commercial use.<\/p>\n<p>The latitude\/longitude to OS reference conversion routines use the algorithms published by a former colleague at Swansea University, the late Dr Derek Maling, though I must claim credit for any errors in implementation.<\/p>\n<p>I am greatly indebted to Ian Baines for his considerable help, perseverance and encouragement in porting OSGB and developing the additional necessary code for MAC.\u00a0 Without his help (and his computers!) it would not have been possible.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Routines for Microsoft Excel \u2122 are available which will perform a number of functions including: Import data from a gpx file. \u00a0These files are now the standard interchange mechanism for waypoints, routes and tracks for gps devices. Compact gpx data by removing duplicated or redundant points.\u00a0 Huge savings are possible without significant loss of detail. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":80,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-55","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/pages\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":50,"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/pages\/55\/revisions"}],"predecessor-version":[{"id":346,"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/pages\/55\/revisions\/346"}],"wp:attachment":[{"href":"https:\/\/www.haroldstreet.org.uk\/osgb\/wp-json\/wp\/v2\/media?parent=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}