CSV Rows to New RTFs

Hey, I am trying to improve my use of OmniFocus (Task Manager), where I currently keep a lot of ideas and reference materials that are best suited for DEVONthink.

I have hundreds of ideas in OmniFocus as tasks and their most important information is in the task’s name and the task’s notes. I want to batch export all this “tasks” into DEVONthink, each task as a new RTF, in which file name = task name and file content = task notes.

After exploring the different export options in OmniFocus I think the best suited for this job is the CSV export. When opened in numbers, the resulting CSV has as many rows as there were tasks, each with the following columns: Task ID, Type, Name, Status, Project, Context, Start Date, Due Date, Completion Date, Duration, Flagged, Notes and Tags. I am only interested in exporting the Name and Notes and each row (task) would be a new RTF.

Is there any feature or script I can use?


I’d be interested as well to hear if DTP can accomplish this with AppleScript. However, some time ago I had to do exactly what you’re describing. The solution I found at the time was to use Excel VBA. Here is the link where I got the instructions (just Google how to use VBA if you’re unfamiliar, there are plenty of tutorials):

If I remember correctly, the second to the last solution worked for me. All I had to do was change the location (you’ll have to change the output to rtf; not sure if it will work). You just have to import the csv data into an Excel spreadsheet and delete the columns you don’t want to use and then run the macro.

Hope that helps. And if anyone knows how to accomplish this via AppleScript, please chime in.

Thank you! This one, posted by ‘Igalapedia Project’, did it for me.

Took me a while though to figure out a Path/File access error: some cells in the title column had special characters or where just too long for a filename. I ended up concatenating the title and content columns and just naming the files with sequential numbers.

Changing the .php to .rtf did not work. I just changed it to .txt and converted them to .rtf in DT2 (DT3 Beta seems to have a bug in this conversion.

Sub savemyrowsastext()
Dim x
For Each cell In Sheet1.Range(“A1:A” & Sheet1.UsedRange.Rows.Count)
’ you can change the sheet1 to your own choice
saveText = cell.Text
Open "C:\wamp\www\GeoPC_NG\sogistate\igala_land" & saveText & “.php” For Output As #1
Print #1, cell.Offset(0, 1).Text
Close #1
For x = 1 To 3 ’ Loop 3 times.
Beep ’ Sound a tone.
Next x
Next cell
End Sub

You’re very welcome; glad you got your data into DT!