Tinderbox export via templates is endlessly flexible but the details are easily forgotten. The workarounds are also easily forgotten.
For example, you and I first learned about the view-in-columns-then copy-paste approach in this thread:
The view-in-columns-then copy-paste approach unfortunately does not bring over column headers. And in some cases where I have quotes in the Text of notes it produces scrambled output, whereas the script I posted above works well. Have you tried it?
Click to reveal script
# Select Tinderbox notes (non-contiguous, multiple levels ok) and click run.
# Places quoted character-separated values (CSV) on clipboard for pasting wherever.
# 1. List the attributes in line below, each between quotes. Add/remove/reorder as needed
set grabAttribs to {"Name", "CityName", "SourceName", "Themes", "MyBoolean", "NoteURL", "Path", "Text"}
# 2. And set a delimiter here. Try tab or "," or "|" or ";" or whatever the receiving app expects
set myDelimiter to ","
-- NO USER TINKERING NEEDED BELOW THIS LINE, at least in theory;)
set text item delimiters to quote & myDelimiter & quote
# create separate list to hold lists of attribute values (a "list of lists")
copy grabAttribs to attribVals
set numCols to grabAttribs's length
tell application "Tinderbox 8"
tell front document's selections -- (note use of plural)
repeat with i from 1 to numCols
set attrName to grabAttribs's item i
set attribVals's item i to attribute attrName's value
# adds list of this attribute's values to the list of lists
end repeat
end tell
end tell
set numRows to attribVals's item 1's length
set outStr to quote & (grabAttribs as string) & quote & return # header row
repeat with i from 1 to numRows
set rowItems to {}
repeat with j from 1 to numCols
set rowItems's end to attribVals's item j's item i
end repeat
set outStr to outStr & quote & (rowItems as string) & quote & return # body row
end repeat
set the clipboard to outStr
--return outStr -- uncomment this line to view output in Script Editor 'Result' pane
For export to spreadsheets it matches the flexibility of templates with greater ease in choosing and reordering attributes, and changing the delimiter. Plus it’s reusable. You don’t need to set it up again for each Tinderbox document. Just list the attributes you want, pick a delimiter, select the notes, click , and paste.