Manual on how to convert the Excel Spreadsheet into Couchbase documents
Document scope
Explain how to update the JSON data of The Bango Grid and upload to CouchBase from the GoogleDocs spreadsheet.
Locate and download the CSV files
The Grid data is located in a Google Docs file in the following location (you need to request access to it internally):
Inside this spreadsheet, we can locate two tabs:
- Countries
- Networks
These tabs contain the respective information for Countries and Networks. We don’t need to do anything with the third tab, ‘Column definition’, for now.
We need to download these two tabs as a CSV file. The process is very simple: in each tab, we just have to go to File -> Download as -> Comma-separated values (csv, current sheet).

Downloading the CSV files from the Google docs spreadsheet
We will have two then CSV files. We need to rename them like this:
- Grid master data file - Networks.csv -> networks_v2_2.csv
- Grid master data file - Countries.csv -> countries_v2_2.csv
The next step is open BOTH files in a text editor (such as Notepad++, but any will do) and remove the first two lines.

CSV file with reference headers
The first line should be the numeric one (1001, 1002, etc). The first two rows are unnecessary, only for the spreadsheet reference.

CSV file with reference headers removed
After that, we just have to save the two files.
Upload the new data to CouchBase
Once we have the two CSV files without its first two lines, we have to transform the data and upload it to Couchbase. For that purpose the dev team has created a simple console application that does it automatically. But before running it, we have to update the files.
We log into the SOUTH178 jumpbox (permissions needed), and go to the following path:
C:\Development\Bango.Tools\GRID_DATA

SOUTH-UTIL-178 Grid data directory
Once there, we go to the subdirectory Data\CSV. We will find there the “old” files. We have to rename them (for backup purposes) with the same name + current date.csv, for instance. Then copy the new files we downloaded. We should have something like this:

SOUTH-UTIL-178 Grid CSV data directory
Then, we go back to GRID_DATA, and go to the subdirectory Grid tools.

SOUTH-UTIL-178 Grid console app directory
We need to run the file NetworkIdFromNameAndCountry.exe. The console menu will appear.

Bango Grid console app menu
We need to run ONLY the option 1, ‘Update carrier data’.

Bango Grid console app data updated
IMPORTANT: The CSV files need to be available. Therefore they can’t be open while the console app accesses them or there’ll be an error.
If the message ‘Carrier data info updated’ appears, the operation has been successful. We just need to quit by pressing ‘q’.
As last check, we need to log into http://grid.bango.com and check the cards appear. If they do, the data has correctly been placed.
