![]() |
VOOZH | about |
The CData Excel Add-In for NASA provides formulas that can query NASA data. The following three steps show how you can automate the following task: Search NASA data for a user-specified value and then organize the results into an Excel spreadsheet.
The syntax of the CDATAQUERY formula is the following:
=CDATAQUERY(Query, [Connection], [Parameters], [ResultLocation]);
This formula requires three inputs:
Connection: Either the connection name, such as APIConnection1, or a connection string. The connection string consists of the required properties for connecting to NASA data, separated by semicolons.
Most NASA API endpoints (APOD, NeoWS, DONKI, TechTransfer) require a NASA API key. Register for a free key at https://api.nasa.gov. The default DEMO_KEY provides limited access (30 requests/hour, 50 requests/day); a registered key allows 1,000 requests/hour.
The following endpoints do not require an API key and work without authentication: EONET (Earth Observatory Natural Event Tracker), EPIC (Earth Polychromatic Imaging Camera), NASA Image and Video Library, and TechPort.
After obtaining your API key, set the following connection properties:
Profile=C:\profiles\NASA.apip;AuthScheme=APIKey;APIKey=YOUR_NASA_API_KEY
Once the authentication is configured, you can connect to NASA and query data from any of the available tables such as AstronomyPictureOfDay, NearEarthObjectFeed, EonetEvents, and NasaImageLibrary.
The procedure below results in a spreadsheet that organizes all the formula inputs in the first column.
=CDATAQUERY("SELECT * FROM AstronomyPictureOfDay WHERE StartDate = '"&B4&"'","Profile="&B1&";AuthScheme="&B2&";APIKey="&B3&";Provider=API",B5)
👁 Formula inputs used in this example. (Google Apps is shown.)Connect to live data from NASA with the API Driver
Connect to NASA