Skip to content

convertxlsform

0.3.0Package record

Convert an 'XLSForm' to a 'Word' or PDF Document

0packages depend
12downloads / year
95.5%test coverage
7/7flavors OK

Overview

About

Converts 'XLSForm' questionnaires, as used by 'Open Data Kit' ('ODK') and 'KoboToolbox', into formatted paper versions for interviewing and review. See https://xlsform.org for the 'XLSForm' standard. Output is a 'Word' document ('.docx') or, optionally, a PDF produced from that 'Word' document with 'LibreOffice'. Supports multilingual forms, nested question numbering, skip logic display, and question and choice media.

Changes in 0.3.0

A complete rewrite. The package writes Word and PDF paper versions of an XLSForm through a new API, a terminal interface and one document model that both outputs share.

New features

  • convertxlsform() writes a Word document (.docx) by default. format = "pdf" or format = c("docx", "pdf") also writes a PDF. The output location, format and overwrite rules follow from the arguments, and the function returns the paths invisibly.
  • PDF output converts the Word document with LibreOffice. Microsoft Word is used through the doconv package when LibreOffice is not found. docx_to_pdf() and has_libreoffice() are exported.
  • cli() runs a conversion from a terminal, for example Rscript -e 'convertxlsform::cli()' form.xlsx --format pdf. Scripts can use quit(status = convertxlsform::cli()) to get the exit status.
  • xlsform_outline() returns the numbered form as a data frame, for checking a form before conversion.
  • xlsform_languages() lists the languages in a form and marks the default.
  • Language columns are read from label::English (en), label::en and label::English. The lang argument accepts a code, a name or the full suffix. A blank translated cell falls back to the plain column, then to the default language. Headers with a common language name only, such as label::French, also match their ISO 639-1 code (lang = "fr").
  • Skip logic, constraints and choice filters are written in plain language. Expressions that cannot be read are shown as written.
  • Connective phrases such as "Ask if" come from built-in English and French tables. The strings option replaces any of them for another language.
  • Paper layouts for each question type: single and multiple choice, rank, long lists as code boxes, write-in boxes, numeric, date and time formats, geographic and media questions, and acknowledgments.
  • Groups and repeat groups, with nested numbering (nested_serial_numbers) and blank copies of repeats (repeat_copies).
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
  • Question images are scaled to at most 2 inches tall, and choice images to at most 0.6 inches. A missing media or choice file triggers one combined warning, and a missing image prints a placeholder.
  • Complex-script fonts are chosen from the text for Bengali, Arabic, Devanagari and Ethiopic. The font_family_cs option overrides the choice.
  • Page size, orientation, margins (up to 2 inches), fonts, a reference template, title, and switches for hints, constraints, relevants, choice codes, variable names and hidden rows.
  • Bundled examples: inst/extdata/multilang (multilingual, with an external choice list and images) and inst/extdata/all_types (every question type and feature the package renders).

Changes from 0.2.1

  • Arguments are renamed: xlsform_path is now xlsform, output_docx is now output, selected_language is now lang, and number_questions is now nested_serial_numbers. The 0.2.1 names are not accepted.
  • HTML tags in labels are stripped. Emphasis in Markdown is rendered.
  • Imports are reduced to cli, flextable, magrittr, officer, readxl, rlang and zip, plus base packages (stats, tools, utils). optparse is no longer used, and the command line is parsed by cli().

Known issues

  • PDF output can show blank text for Bengali and other complex scripts when LibreOffice cannot find a suitable font on the machine. The Word document is correct. A fix is planned for 0.4.0.

From NEWS.md in the release

Install

Health

CRAN checks
7OK
Slowest check: 5.5 min · r-release-macos-x86_64
Status changes
  • OK7 OKNow
  • OK1 OK2026-10-21
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 2,328 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 0.3.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
7 (1 internal)includes a package overview page
Examples that run
100%6 run in a plain check (1 of them under a condition)
Exported functions with examples
100%
Documented parameters
90%
Return-value docs
100%
Help pages citing references
0%
Vignettes (1)

Downloads

12
CRAN downloads in the past year
Rank #25,659 · ~0/day · ~1/mo
convertxlsform
Daily download trend is not available in this view yet.

Repository

1Stars
0Forks
0Open issues
1Open PRs
1Releases
Last activity 2026-10-22
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
not measured
PracticesBeta

Repository github.com/masud90/convertxlsform is linked, but repository-practices checks have not run for it yet.

How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
13 external dependencies (excludes base and recommended)

Installing convertxlsform adds 65 packages (37 with compiled code, 55 MB of source tarballs). Heaviest: stringi 11 MB, data.table 5.7 MB, bslib 5.6 MB.

Depends (1)
R >= 4.1
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.3.0 (2026), Copyright holder
Releases (1)
  • 0.3.0Latest
    2026-10-21 · current release ·
    8 days in CRAN's queue
    Listed in CRAN's incoming queue from 2026-10-13 08:46 to 2026-10-21 15:47 UTC, in 49 readings.
  • R
    R 4.6.0 released · 2026-04-24
Across CRAN, the median accepted release of the past year spent 23 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2026-10-21
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1
Download size
598 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("convertxlsform")
Rahman, M. (2026). convertxlsform: Convert an 'XLSForm' to a 'Word' or PDF Document (Version 0.3.0) [Computer software]. https://doi.org/10.32614/CRAN.package.convertxlsform

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for convertxlsform version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy