Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Database export.

Database export: Difference between revisions

From MoodleDocs
No edit summary
 
m (template edit)
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
The list template can be used to export your database in the following way. It is assumed that you have a database with N fields, and that in this example the fields are named field1, field2 ... until fieldN.
{{Database activity module}}
The [[Database_templates#List_template|list template]] can be used to export your database as a CSV file in the following way. It is assumed that you have a database with N fields, and that in this example the fields are named field1, field2 ... until fieldN.
 


== Header ==
== Header ==
Line 22: Line 24:


To export, simply select the View List tab and all your data will be in the CSV format. By default only 10 records are displayed, but this can be increased. Copy and paste to your required tool.
To export, simply select the View List tab and all your data will be in the CSV format. By default only 10 records are displayed, but this can be increased. Copy and paste to your required tool.
== Import ==
To import, go to the "Add Entry" page - [[Adding_a_database_entry]].
==See also==
* [[Adding a database entry]] - including import.
[[de:Datenbank_Export]]
[[ru:Экспорт базы данных]]
[[ja:データベースのエクスポート]]

Latest revision as of 13:56, 11 August 2009


The list template can be used to export your database as a CSV file in the following way. It is assumed that you have a database with N fields, and that in this example the fields are named field1, field2 ... until fieldN.


Header

In the header create a comma separated list of the field names

field1,field2,...,fieldN

Repeated entry

In the repeated entry create a comma separated list of the field tags

[[field1]],[[field2]],...,[[fieldN]]

Save the template!

Export

To export, simply select the View List tab and all your data will be in the CSV format. By default only 10 records are displayed, but this can be increased. Copy and paste to your required tool.

Import

To import, go to the "Add Entry" page - Adding_a_database_entry.

See also