Import from CSV into DatagridField

Do you think it is possible to import those (Datagridfield) rows from a CSV file (or Excel)

Why shouldn't that be possible? There are modules for reading/writing CSV/Excel.
The DataGridField data structure is just a simple Python list with a dict for each row...total easy...

I would think so, the selection field in the left column is a dynamic vocabulary. Fields are DictRows if I remember correctly, you can use whatever you want to get the data.

Looks like one does not need to 'bother width dictrows in the code, so something like:

my_table = []
data=csv_file.data

reader = csv.reader(
        StringIO.StringIO(data),
        delimiter=';',
        dialect='excel',
        quotechar='"'
)
header = reader.next()

for row in reader:
my_table.append({'name': row[0], 'email': row[1]})

self.context.table = my_table

seems to work

Plone Foundation Code of Conduct