What Is An Xlsform?: The Survey Worksheet
What Is An Xlsform?: The Survey Worksheet
XLSForm is a form standard created to help simplify the authoring of forms in Excel.
Authoring is done in a human readable format using a familiar tool that almost
everyone knows - Excel. XLSForms provide a practical standard for sharing and
collaborating on authoring forms. They are simple to get started with but allow for the
authoring of complex forms by someone familiar with the syntax described below.
The XLSForm is then converted to an ODK XForm, a popular open form standard,
that allows you to author a form with complex functionality like skip logic in a
consistent way across a number of web and mobile data collection platforms.
Basic format
Each Excel workbook usually has two worksheets: survey and choices. A third
optional worksheet called settings can add additional specifications to your form and
is described below.
Both of these worksheets have a set of mandatory columns that must be present for
the form to work. Additionally, each worksheet has a set of optional columns that
allow further control over the behavior of each entry in the form, but are not essential
to have. Every entry must have values for each of the mandatory columns, but the
optional columns may be left blank.
The columns you add to your Excel workbook, whether they are mandatory or
optional, may appear in any order. Optional columns may be left out completely. Any
number of rows may be left blank. All .xls file formatting is ignored, so you can use
dividing lines, shading, and other font formatting to make the form more readable.
One thing to keep in mind when authoring forms in Excel is that the syntax you use
must be precise. For example, if you write Choices or choice instead of choices,
the form won't work.
Question types
XLSForm supports a number of question types. These are just some of the options
you can enter in the type column in the survey worksheet in your XLSForm:
GPS
For example, to collect the name and GPS coordinates of a store, you would write
the following:
To collect a line or shape of GPS coordinates, you can use one of the following:
nam
type label hint
e
Please walk along the pipeline and record the coordinates
geotrace pipe Pipeline
of each corner point
geoshap Please walk along the border and record the coordinates
border Border
e of each corner point
surveychoicessettings
Multiple choice
XLSForm supports both select_one (select only one answer)
and select_multiple (select multiple answers) questions. Writing a multiple choice
question requires adding a choices worksheet to your Excel workbook. Here is an
example of a select_one question:
list
name label
name
yes_no yes Yes
yes_no no No
surveychoicessettings
Note that the yes_no in the survey worksheet must match the yes_no in the list
name column in the choices worksheet. This ensures that the form displays the
correct list of answer choices for a particular question.
We can also add multiple choice questions that allow multiple answers to be
selected, like so:
Choice names
The name column of the choices sheet defines the values that will be saved when
each choice is selected during data collection. Choice names
for select_multiple must not contain spaces because spaces are used as a
separator when an answer with multiple selected choices is saved. Choice names
for select_one questions may contain spaces. However, we recommend avoiding
them to make analysis easier. Additionally, this makes it possible to convert the
question to a select_multiple in a future form version.
In general, choice names should be unique within a single choice list. If two choices
from the same list have the same name, they will be impossible to tell apart in
analysis. If you have duplicate choice names, you will get an error and your form will
not be converted. However, it may sometimes be appropriate to have duplicate
choice names. An example would be if you use a cascading select and the choices
with the same name are differentiated by a preceding question. If you do need to use
duplicate choice names, you can suppress the error by using
the allow_choice_duplicates setting:
allow_choice_duplicates
yes
surveychoicessettings
Specify other
For multiple choice questions, surveys often include an option of marking other when
their answer choice is not listed. Then they are usually asked to specify the other
option. This is possible through XLSForm by including or_other after the answer
choice list name in the survey worksheet. The choices worksheet stays the same.
See below:
Caveat
When you export data using this or_other option, in the favorite_topping column,
you will see a value other. A separate column will have the answer for the questions
in which the user selected other. This makes data analysis more cumbersome, so
we do not recommend the or_other construct for large scale data collection efforts.
See the Relevant section below for an alternative method more appropriate for large
scale projects.
<root>
<item>
<name/>
<label/>
...
</item>
</root>
Both CSV and XML files may have additional columns and XML nodes as long as the
above-mentioned basic requirements are met.
Note that this question type is generally the preferred way of building select
questions from external data as it is the most versatile and works across applications.
However, if your external data file consists of many thousands of lines, please test
carefully whether the performance is satisfactory on the lowest spec device you
intend to use. If it is too slow, consider using External Selects or Dynamic selects
from preloaded data if your data collection application supports it.
Rank
The rank widget can be used to let respondents order a list of option