Newbie question: importing spreadsheet

I’m thinking of totally moving over from Windows to Mac (instead of the partially moving over I’ve done), and one of the things hanging me up has been Outlook Journal. I have thousands of items in Journal - separate notes - that I’d want to get into DT. I have exported all the notes into an Excel spreadsheet, and am wondering if there’s an AppleScript that could do this.

Each Journal item would become a separate rich-text document inside DT - the Journal item’s category field would translate to the Group, and the Subject field would translate to the Name.

Sorry for the newbieness of this … I don’t know much about AppleScripts (yet), but have a feeling this can be done.

Thanks in advance,


Please try this:

  1. Export your Excel sheet as a .csv file
  2. Import the exported .csv file into DEVONthink Pro

Now, if this import should be successful, it’s quite easy to script the sheet in DT Pro to create groups & notes automatically. But I’m waiting for the result of the first two steps first before I will continue :slight_smile:

Thanks for the fast reply - that worked. I now have 2286 items from journal.csv, each of which has four fields: Subject, Date Created, Body and Category.

And DT is set up to to show three panes: Groups, Documents and Contents.

I’d like Subject to be the Name of the rich text document … Date Created would ideally go into the Created column of the Documents pane, but if it cannot - and I can’t seem to be able to change that value in the Documents pane - I’d settle for it going into the Comments column … Body would become the text in the Contents pane … and Category would define what group folder it would go into.

This simple script might work if the order of the columns is Subject, Date, Body and Category. Note: You have to select the sheet in the frontmost window.

tell application "DEVONthink Pro"
	set theSheet to content record of think window 1
	if type of theSheet is not sheet then error
	set theForms to children of theSheet
	repeat with theForm in theForms
		set theFields to cells of theForm
		set theSubject to item 1 of theFields
		set theBody to item 3 of theFields
		set theCategory to item 4 of theFields
		set theGroup to create location "/" & theCategory
		create record with {name:theSubject as string, type:txt, text:theBody as string} in theGroup
	end repeat
end tell