This tutorial shows you how to convert your XLSForm format questionnaire forms into XForms. This tutorial assumes that:
- You already have knowledge of the XLSForm standard and the skills to author questionnaire forms using this standard. A comprehensive tutorial guide on the XLSForm standard can be found here.
- You have a basic knowledge of the different components needed in order to deploy a mobile data collection system based on Open Data Kit (ODK) tools. Information on the suite of ODK tools for mobile data collection can be found here.
You need to perform this step if you are using ODK Aggregate (either as an online server or as a local server) or if you are transferring your questionnaire forms from your computer to the mobile device/s to be used for data collection via direct USB cable connection. ODK Aggregate only accepts questionnaire forms in XForms format for uploading. For mobile devices, the XForms format is also the required format in order for the questionnaire form to be readable by ODK Collect.
There are various ways of converting XLSForm into XForms. These options are described here and summarised below.
1. Use the web application available from the Open Data Kit website
This webtool converts questionnaire forms written in XLSForm standard and saved as .xls or .xlsx files. The file is submitted to the tool and then the tool first validates the form (i.e. checks for syntax errors) and then once validated, converts the form in XForms format. The resulting converted file can then be downloaded and used to publish into ODK Aggregate or transferred directlly into the mobile device for use in ODK Collect.
It should be noted however that the tool can only be used with internet access.
1.1 Go to http://opendatakit.org/xiframe/
1.2 Click on ‘Choose File’
1.3 Select the questionnaire form that you want converted
Navigate the finder window to the path of the questionnaire form that you have created in XLSForm standard and saved as .xls or .xlsx file (1) and then select the file (2).
1.4 Click on ‘Submit’
After selecting the XLSForm that you want to convert, you will see the name of the file with a spreadsheet icon beside the ‘Choose File’ button (1). Check that this is indeed the file that you want to convert and when ready, click on ‘Submit’ (2).
1.5 Wait for the application to convert the XLSForm into XForm
A progress bar will show up (1). This will indicate that the conversion is ongoing.
1.6 Conversion completed
Once conversion is completed, the application will give you the option to download the the XForms version of your XLSForm (1).
In addition, some notes and comments about your form will also be provided (2). This is a form of validation of the form that you have just converted. If there are major issues with your XLSForm standard form, the conversion to XForms will not be successful and this will be indicated in this comments section.
1.7 Click on ‘Download’
If conversion is successfully completed, click on the ‘Download’ button to get the XForms version of your form. Go to the downloads folder of your computer. The filename for the XForms version of your form will be the same as the filename of your XLSForm but the file extension will be .xml (1).
2. Use XLSForm offline by Nafundi
An alternative to the online webtool above is an application that can be used without internet. There are a few options for this alternative a list of which can be viewed here. One of these offline tools is XLSForm Offline created by Nafundi.
XLSForm Offline is an app for Windows and Mac that converts data collection forms created with XLSForm into XForms that can be used by the ODK Collect mobile app or ODK Aggregate server. XLSForm Offline also validates the XForms, ensuring that it will run perfectly with all ODK tools.
XLSForm Offline does not need an Internet connection, so it’s always available, very fast, and easy-to-use. Just choose your Excel file and press a button to get a ODK-ready XForms.
2.1 Download and install XLSForm Offline
XLSForm Offline can be downloaded here.
Once downloaded, install XLSForm Offline. For Windows XP or Windows 7, double-click the file named ‘XLSForm Offline 1.4.0.exe’ and follow the subsequent prompts for installation. For Mac OS X, drag and drop the ‘XLSForm Offline 1.4.0’ icon to your Applications folder.
XLSForm Offline has been made available by Nafundi as free software although they suggest / recommend a price for the software for those who are willing and able to pay for it.
2.2 Open XLSform Offline
In Windows XP or Windows 7, go to Start –> Programs –> XLSForm Offline 1.4.0. In Mac OS X, open Applications folder and then double click on XLSForm Offline 1.4.0 icon. The application looks like this once opened. The next steps of the tutorial shows steps done in a Mac OS X computer but there is no difference in the appearance or usage or functionality of XLSForm Offline 1.4.0 that is installed on a Windows or a Mac.
2.3 Click on ‘Choose file…’
2.4. Select XLSForm to convert to XForms
Navigate to the directory path in your computer that contains the XLSForm (in .xls or .xlsx) format that you want to conver to XForm. Select the file (1) and click on Open (2).
2.5. Select location to save the output of the conversion
You will now see the path to the file of your XLSForm that you want to convert indicated beside the ‘Choose file’ button (1). This will tell you whether you have indeed selected the correct file that you want to convert.
Below this, you will also see that beside the ‘Choose location’ button you will now see a directory path indicated (2). This is the same path to the folder in your computer in which the XLSForm you want to convert is saved at. By default, the application will save the output of the conversion into the same folder that contains the XLSForm you want to convert. You can keep this as is and just take note and remember that this is the default location or you can change the location in which the conversion output is saved at.
To change the location, click on ‘Choose location’ button.
2.6. Specify a new location
Using the file viewer dialog box that comes out, navigate to the location in your computer in which you want to save the output of the conversion. In this case, within the folder containing the XLSForm, a sub-folder named ‘XML’ was created to which the output of the conversion will be saved (1).
Select the location and then click on ‘Open’ (2).
2.7 Check new location
You will now see that beside the ‘Choose locaiton…’ button that the indicated path has changed to the location that you have specified (1).
2.8. Set conversion options
You can decide to set / change the conversion options.
First, decide whether you want to overwrite existing output file(s) (1). This option is by default unchecked. This option allows you to keep or overwrite any existing output file that is currently in the location that you have specified for saving outputs of the conversion. If you check this option, any existing output file inside the save location that has the same filename as the current file you are converting will be overwritten (i.e., you will lose the old file and it will be replaced by the new output). This option will be useful when you are in the editing phase of your forms and you are going back and form between your XLSForm and XForms and creating newer versions of the same form. However, if in the save location you have selected earlier there is an XForms with the same name as what you are currently converting but is a different form altogether (e.g., an earlier form you created but for a different data collection project), you will lose the earlier form that you have made if you select this option. In such a situation, if you leave this option unchecked and you convert an XLSForm with the same filename as an existing output in the save location, the current output will be saved with the same filename but appended with a number.
Second, decide whether you want the application to validate the converted XForms (2). This option is by default checked. It is recommended that this option be kept at default (checked) so that you will know whether there are issues with your XForms and to address these issues as needed.
Once you have decided on the conversion options, click on ‘Run’ button (3).
2.9 Review validation messages and check location of your output
You will now see messages at the bottom window of the application. This window will show messages regarding the validation done by the application on the created XForms (1) and will remind you of the location of the created output (2).