Comma-separated value (CSV) files are delimited text files containing questions that have been exported from spreadsheets like Microsoft Excel®, Microsoft Access® and Google Sheets®.
You can import and export the following questions types within CSV files:
True or false
Multiple choice
Multiple response
Fill in the blank
Number entry
Matching
Rank/sequence
Short answer
Essay
The format is similar for each question type:
For the question text, choices and feedback, keep these rules in mind:
Each question must contain text representing the NAME
, TYPE
, and QUESTION TEXT
.
You may use line breaks within fields, such as within a question’s text. (Alt+Enter using Microsoft Excel. Ctrl+Enter using Google Sheets. Other programs may vary.)
Separate multiple options or multiple correct choices with a space.
Repeat the pair of CHOICE TEXT
and CHOICE INFO
for each answer choice.
Each question must start on a new line.
Complete each field in the records as follows:
Field (* = required) | Description | ||||||||||||||||||||
NAME * |
Name to be used for the question. This will also be used for the page name and the variable name. | ||||||||||||||||||||
TYPE * |
Abbreviation representing the question type as either:
|
||||||||||||||||||||
QUESTION TEXT * |
Text of the question. | ||||||||||||||||||||
QUESTION OPTIONS
|
Options for questions depending on the question type. Leave empty to use the default options for the question:
|
||||||||||||||||||||
FEEDBACK OPTIONS
|
Options for feedback. Leave empty for no feedback:
|
||||||||||||||||||||
CORRECT FEEDBACK
|
Custom correct feedback (if feedback is set in FEEDBACK OPTIONS ). If this field is empty, the default correct feedback will be used (see Specifying publish strings preferences). |
||||||||||||||||||||
INCORRECT FEEDBACK
|
Custom incorrect feedback (if feedback is set in FEEDBACK OPTIONS . If this field is empty, the default incorrect feedback will be used (see Specifying publish strings preferences).
|
||||||||||||||||||||
CHOICE OPTIONS
|
Options for choices depending on the question type:
|
||||||||||||||||||||
CHOICE TEXT * |
The text for each answer choice:
|
||||||||||||||||||||
CHOICE INFO |
Extra data used based on the question type:
|
The pair of CHOICE TEXT
and CHOICE INFO
is repeated for each answer choice.
To view and download a sample CSV import file, visit the discussion Working with CSV Question Files in Lectora in our Trivantis Community.
Although a spreadsheet application is recommended, CSV files can also be created in text format using a program such as Notepad or Notepad ++. Where columns are indicated in the sample above, instead insert a comma between each field. If you are using a text-file version of CSV, text that contains a comma must be enclosed within quotes. “For example, this sentence contains a comma.” |
To import a CSV file:
In the Title Explorer, highlight the page after which you want to insert the questions from the CSV file.
From the Test & Survey ribbon, click Import CSV from the CSV Question File group. The Import CSV Question File window opens.
Use the File to Import field to specify the file to import or click the Browse button to navigate and select the CSV file.
Enable the Create as Test check box to create a test and import the question file within the test.
To offset the question on the page, enable the Offset question on page check box. This enables the X offset and Y offset fields. The X offset is the pixel distance from the left edge of the page. The Y offset is the pixel distance from the top edge of the page.
In the Font and Color box, use the controls to select the appropriate text style, font, font size, highlighting, and text color for the questions being imported. For details, see Working with text.
Click OK.
The questions are imported, one per page.
You can also export individual questions from within the title or all of the questions within a test, test section, or survey.
The total number of questions successfully exported will be reported, along with any errors or questions unable to be exported.
To export individual questions:
In the Title Explorer, double-click the graphic of the question. The Properties tab opens. To select multiple questions, click the first question, then press and hold the CTRL key while you click the other questions.
On the Properties tab, click the graphic below the Variable field in the first group. The Export to CSV window opens.
Navigate to the appropriate location.
Name the CSV file and click Save.
The question export file is saved.
Alternatively, in the Title Explorer, highlight the test, test section, or survey to export all of the questions contained within to a CSV file. Double-click on the object to view the Properties ribbon.
To export all the questions within a test, test section, or survey:
In the Title Explorer, double-click the graphic of the test, test section, or survey. The Properties tab opens. To select multiple tests, test sections, or surveys, click the first test, test section, or survey, then press and hold the CTRL key while you click the other tests, test sections, or surveys.
On the Properties tab, click the Export to CSV graphic in the Test group. The Export to CSV window opens.
Navigate to the appropriate location.
Name the CSV file and click Save.
The question export file is saved.
Open the CSV file using your spreadsheet application (recommended) or a text editor.
Additional resources: Private: Bulk Import Questions Using CSV Files
© Copyright eLearning Brothers 2021