Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Re: Excel -> Links

Quote Reply
Re: Excel -> Links In reply to
I recently moved a 5,000-plus link directory into Links 2.0. It was originally created on the Mac through a butt-ugly combination of FileMaker, Frontier, and BBEdit.

The FileMaker dbase included several variable-length (repeating) fields and a few fields longer than 256 characters. I managed to get it into Links -- adding, combining, and rearranging a number of fields -- using only Excel and a freeware DOS search/replace utility. (I used George Dinwiddie's 10-year-old XLate program, but there are dozens of them out there.)

Excel wouldn't correctly read the dbase when I exported it from FileMaker as a tab-delimited text file, so I first Xlated it to clean up the odd characters FM uses to designate repeating fields. (I also ran a few passes to clean up Mac-centric "smart quotes" and accented characters.) I then imported it into Excel and whaled away at it, re-organizing its 40-plus fields. I then exported it back as a tab-delimited file.

One caveat: Excel will add quotes to any field containing commas (and, I seem to recall, a few other punctuation marks). As a result, before exporting from Excel, I search-and-replaced all quote characters with x'FF. After exporting, I first stripped out the introduced quotes and then changed all x'FFs back to quotes.

I also had some trouble with getting Excel to export empty fields consistently, so I changed each empty field to x'FE prior to export and then stripped them out before pulling the file into Links.

I didn't think of Alex's trick with $db_delim; instead, I used Xlate one last time to replace x'09 with "|".

A quick pass with the Bulkload utility from the resource center and I was done.

(I also used a similar process to create my category.db. However, there were nearly 700 categories defined in the original site. Each category had a unique code instead of Link's nested hierarchy. For instance, instead of something like "Photos/People/Women/Sportswear/Candid," the category might be called "Ppwscan." I came up with a neat little recursive routine to expand each code into its Links' equivalent. Total time for all of this: About a day.)

Vann
Subject Author Views Date
Thread Excel -> Links XanthisHP 1501 Aug 13, 1999, 11:17 AM
Post Re: Excel -> Links
XanthisHP 1464 Aug 13, 1999, 11:28 AM
Post Re: Excel -> Links
vewdew 1460 Aug 13, 1999, 11:44 AM
Post Re: Excel -> Links
Alex 1463 Aug 13, 1999, 1:00 PM
Post Re: Excel -> Links
Brad Richardson 1461 Aug 13, 1999, 1:35 PM
Post Re: Excel -> Links
Vann 1464 Aug 16, 1999, 5:07 AM