Note: You are currently viewing documentation for Moodle 3.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Dataformview CSV.

Difference between revisions of "Dataformview CSV"

From MoodleDocs
Line 1: Line 1:
 
{{Dataform}}
 
{{Dataform}}
The Dataform CSV view is designed mainly for export/import purposes. This view allows you to predefine which Dataform field can be csv exported/imported, in which order, choose your own custom names for columns (which may be different from the field names) and add flexible input/output data (e.g. human readable dates, entry author info etc.).  
+
The Dataform CSV view is designed mainly for CSV export/import purposes. The view allows you to predefine the set of Dataform fields to export/import, the desired field content by pattern (e.g. human readable dates, entry author info etc.), the export column order, the import column headings and the target export type (csv, xls, ods).  
You may also define different export/import templates (different instances of the csv view) and via the view access permissions allow different roles/users access to a designated export/import instance.
+
You can define different export/import templates (different instances of the csv view) for the same activity and via the view access permissions allow different role/user access to designated export/import views.
 
==Usage==
 
==Usage==
 
===Export data to a csv file===
 
===Export data to a csv file===
Line 32: Line 32:
 
##export:page##: ...
 
##export:page##: ...
 
##import##: ...
 
##import##: ...
 
 
</nowiki>
 
</nowiki>
 +
==Import form==

Revision as of 19:18, 30 January 2014

The Dataform CSV view is designed mainly for CSV export/import purposes. The view allows you to predefine the set of Dataform fields to export/import, the desired field content by pattern (e.g. human readable dates, entry author info etc.), the export column order, the import column headings and the target export type (csv, xls, ods). You can define different export/import templates (different instances of the csv view) for the same activity and via the view access permissions allow different role/user access to designated export/import views.

Usage

Export data to a csv file

  • Open view
  • Click Export all or Export page from the menu bar.
  • A csv file will be downloaded to your computer.

Import data from a csv file

  • Click import option in the menu bar.
  • Fields import settings - list of fields to be imported.
  • Csv settings - control file settings and upload file.

Settings

Export/Import settings

Patterns

Export

Export to

Select your preferred file format for export purposes. The default format is set to CSV. Other options are: excel, calc, etc.

Import

CSV settings

  • Delimiter: Select the character which separates fields in the exported/imported CSV file. The comma character (,) is set as the default character. Other available characters are: semicolon (;) colon (:) and tab (/t).
  • Enclosure: Select the character that surrounds each field. By default there is no enclosure.
  • Encoding: Select a default character encoding. For Import you can override this default in the Import form.

Patterns

Type specific patterns

##export:all##:	...
##export:page##:	...
##import##:	...

Import form