OK, for the coding gurus here, a challenge that I bet is child’s play for most of you, but that seems very challenging for me.
Background: from back in the days when I used the lovely, doomed Lotus Agenda, in the 1990s–background here, my 1992 Atlantic article on Agenda available in PDF here–I have some research files whose data I’d like to be able to get at again.
Remember when I mentioned, in a different thread, about the virtue of Tinderbox, is storing its data in XML? Which means that it never truly can be orphaned? That was based partly on rough experience with Agenda, whose own native .AG files (which run only on DOS), really are orphaned.
But on one of my still DOS-capable machines, I’ve used Agenda’s “export” facility to send its data out to a “structured file.” My goal is to convert this structured info into a spreadsheet, so that I can then selectively bring it into Tinderbox.
Your mission, should any of you accept it: guide me on the macro or search-and-replace routine that will let me convert a structured file to spreadsheet-available form.
***
The file I want to convert contains about 2,000 items, all of which have the following regular structure:
- {I} indicates the beginning of a new item
- {T} begins the title, or $Name in TB terms, of the item
- {N} marks the beginning of what would be the TB $Text field
- Each of a series of category assignments – the equivalent of columns in a spreadsheet – begins with {C} and ends with {.}
- The end of an item is marked with {!}
{I}{T}This is the name field
{N}This is the equivalent of the $Text field{S}
{C}First value field
{.}
{C}Second field
{.}
{C}A date field 03%/01%/1998 21:18
{.}
{C}Another date field 02%/16%/1998
{.}
{C}A numeric field #1.2
{.}
[A bunch of other fields…]
{C}Final numeric field #0
{.}
{!} [End of this item]
So we have regular markers: for the beginning and end of an item, for its name and its text field, and for the various values that I would like to convert to spreadsheet columns.
I imagine that for some of you, it would be five minutes’ work to suggest the macro that would let me put this into a form that would allow me to populate a spreadsheet with the values – and then import many of them to a TB file. If I’m right, and one of you has this on the top of your head, great! If it’s hard even for experts, that is useful to know too.
Thanks!