bulldo.gs

Catch a missing XLSForm language header

A single hint header in a bilingual form can cause Kobo to reject the upload. Try the error in a two-question shelf-count survey, find its cell in Google Sheets and fix it before you export.

Download the practice XLSForm Download the Apps Script

Run the header check

  1. Upload the practice workbook to Google Drive, open with Google Sheets, then use File → Save as Google Sheets to get a native, editable copy. Leave the survey, choices and settings tab names as supplied.
  2. In Extensions → Apps Script, paste the contents of the downloaded script into the bound editor and save. Select checkKoboLanguageHeaders and click Run. On first run, review the requested access to this spreadsheet. The function reads the headers and default-language setting and writes its findings to the execution log.
  3. Open Execution log. The supplied workbook passes. Now change survey!E1 from hint::English (en) to hint. Run the function again. The log points to survey!E1 and identifies the missing English hint column.
  4. Restore hint::English (en) in that cell and rerun. Export the corrected file with File → Download → Microsoft Excel (.xlsx). Preview the form in both languages before collecting responses.

Use it on another multilingual form

The script takes the language names from translated survey labels. It checks label, hint, guidance_hint, required_message and constraint_message headers for consistent spellings, duplicates and missing language columns. It also checks a populated settings.default_language against the label headers. Use Kobo’s validator and preview for form logic, media and other XLSForm features, and have a fluent speaker review the translations.

Kobo’s guide to adding translations · Uploading and testing an XLSForm