Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Export from CommCare.zip: The zip file that contains Raw Data.csv that is downloaded from CommCareHQ.

CommCareHQ Application from the App Exchange (Coming Soon)This tutorial uses a very simple "Pregnancy Tracker" application to create the example data.  You can download this application from the Exchange to try yourself shortly.

...

Step 1:

...

Create

...

Custom Export in HQ for the project

  1. See this  this page for  for details on creating the data export: Data Export Overview
    1. For Export Name name it "Raw Data"
    2. For Default File Type choose CSV (zip file) as Name your export
    3. For Default File Type choose Excel 2007 as the Default File Type.  Excel won't recognize dates properly if you use an Excel file type. 
    4. Choose Automatically convert dates for Excel
    5. Choose Create a Daily Saved Export
    6. Be sure to rename your Display columns to your Display columns to how you want them to display in your reports.
  2. Download your export and save the zip file to your computer
    Unzip the file you downloaded. It should contain a file called "Raw Data.csv"
    1. If it is not a zip file, you need to edit the export and choose CSV as the default file type
  3. Your exported data will look like the below picture:

  Image Removed

(obsolete) Step 2: Create the Report File and Import the Data

The next step is to create the file that will hold the reports. This is a separate Excel file than your raw data file.  This way you can update the raw data without having to change the reports file.

...

Step 1: Create Custom Export in HQ for the project

  1. See this page for details on creating the data export: Data Export Overview
    1. For Export Name name it "Raw Data"
    2. For Default File Type choose CSV (zip file) as the Default File Type.  Excel won't recognize dates properly if you use an Excel file type.
    3. Be sure to rename your Display columns to how you want them to display in your reports.
  2. Once you create the export, it would be listed under 'Saved Custom Exports'.
  3. Across the export, click on 'HTML Preview' button. It would show you the raw data in the browser. Copy the URL.

...

  1. Save the export

Image Added

Step 2: Copy the Web Address of your saved export

When you chose to Create a Daily Saved Report in step 1, this meant every night CommCare will generate the export with all the latest data and save it. We will use this report to pull into Excel.

  1. Scroll to the bottom of the Data Exports Page
  2. In the Daily Saved Exports section you will see your saved export.
    1. ***Important*** It will take one night after creating the export for it to appear. CommCare saves the report nightly.
  3. Right-click on the link to the export
  4. Choose Copy Link Address in the menu. This will copy the URL of the export file so you can paste into Excel in the next step.

Image Added

Step 2: Create the Excel File and Import the Data

The next step is to create the file that will hold the reports.

  1. In Excel, Create a New File. Call it "Reports.xlsx" (or whatever you would like to name it)
  2. You will have a blank Excel file now.
  3. Now we will pull in the data from the csv Excel file
    1. Choose the Data menu
    2. Choose From Web in the "Get External Data" options in the top left
      Image Removed
    3. Paste the URL that you copied in Step 1. Then click Go.Choose Connections
      Image Added
    4. Choose Add... from the Workbook Connections window that appears.
    5. The "Existing Connections" window appears.  Choose Browse for More in the bottom left of the window.
    6. It might open a popup asking a username and password. Enter you CommCareHQ username and password.
    7. You would see some data in the window. In the top left of the data, notice a small yellow box with a forward arrow (there might be a couple of them).
    8. Click on the yellow box, just above the data. This would select the data to be imported, and the box would turn into a green checkbox.
    9. Image Removed

    10. Click on 'Import'. It's important to click on the yellow box with arrow, before clicking on Import, otherwise things will not work properly.
    11. Choose New Worksheet in the next window the click "Properties..."
    12. In the Properties window
      1. Check the box for Refresh data when opening the file
      2. Check the box for Refresh every 60 minutes
      3. This will pull the latest data from CommCareHQ every time you open the file, or after 60 mins.

    13. Click OK
    14. Rename the tab "Raw Data"
    15. You now have the data in your reports file and it will automatically update each time you open the file or after 60 mins.

...