Version 8.9.2 - © 2020 Vanderbilt University
How to Create a Microsoft Word Export
of a REDCap Instrument
that Processes HTML Commands
University of Chicago | Center for Research Informatics | REDCap Topic
2
Purpose: Modify a REDCap instrument export so it doesn’t have unprocessed HTML commands in it.
For example, suppose this text is in your REDCap instrument:
<font color = “red”>Yes</font>
and you want it to export the instrument to a CSV file (to eventually put in a table in a Microsoft Word
document). Unfortunately, the export from REDCap will not process/apply/recognize the HTML commands.
Neither will Microsoft (MS) Excel (at least, not without more work from you) or MS Word. That is, if you want
the test to read
Yes
in MS Word or Excel, then follow this process.
Step by step process:
1. Open the Instrument designer in REDCap, and download/export the instrument to a ZIP file
2. Unzip the CSV file and open it in Excel.
3. Format the CSV file in Excel as you wish.
a. Recommendations: delete empty columns, add cell borders, resize width of columns, shrink
font to size 8, resize to fit on Landscape page layout with very small page margins, wrap text in
all cells, bold the heading row font
4. Save the Sheet as a Web page (i.e., as htm or html)
5. Open this new htm file with Internet Explorer (IE) or similar
6. Right-click in the IE window and click “View Source”
7. Copy/paste the source code into a text editor that can find/replace special characters & does not
automatically add file formatting, like Notepad++ (not MS Word; it adds formatting)
8. Find and replace the following
a. &quot; with “
b. &gt; with >
c. &lt; with <
9. Overwrite the htm file
10. Open again in IE, and select everything in the Window (your HTML commands should now have been
processed correctly)
11. Copy/paste all into MS Word and finalize the formatting as you see fit.
Recommendations: Landscape layout, very small page margins, edit the Table Properties to shrink row height
to “at least 0” and to repeat the first row on the top of each page, and use the find/replace tool to delete any
weird extra characters, like Â.
Written By: Thomas J Best, PhD
Manager, Research and Analytics
Center for Health and the Social Sciences
University of Chicago
Date: 2/5/2020
University of Chicago | Center for Research Informatics | REDCap Topic
3