views:

61

answers:

1

I would like to import a CSV into Org-mode. Others have already asked about importing CSV to Org-mode tables. That's not what I am trying to do. I need to import CSV to Org-mode properties.

For example, a CSV like this:

Name,Tel,Mobile,Fax
John,11111,22222,33333

should become:

:PROPERTIES:
:Name: John
:Tel: 11111
:Mobile: 22222
:Fax: 33333
:END:

Do you happen to know a painless way to do it?

+1  A: 

use csv-mode, transpose rows and columns by csv-transpose and format with replace-regexp:

search \(.*\),\(.*\)

replace for: :\1: \2