February 26th, 2020
like1 reaction

What’s up with the CF_SYLK and CF_DIF clipboard formats?

A customer asked, “Please tell us about the CF_SYLK and CF_DIF clipboard formats and if you have information on the specific format to use.”

Okay, let’s start with the first part of the question: What are these things?

The Data Interchange Format is a file format introduced by VisiCalc. VisiCalc was the first electronic spreadsheet for personal computers, a landmark product which expanded the appeal of personal computers into the business world. It was arguably the first “killer app”, the program so compelling that it by itself served as justification for buying a computer. In 1983, VisiCalc ended up being overshadowed by Lotus 1-2-3 and quickly faded into history.

The SYLK format is a file format introduced by Microsoft Multiplan, one of the company’s early forays into integrated productivity software suites. Multiplan didn’t last for long, but it lasted long enough for Windows to add a clipboard format for it. Somewhat ironically, the Microsoft product that replaced Multiplan was Excel, which also served as one of the “killer apps” for that new operating system called Windows.

Now the second part of the question: Which one should we use?

That’s easy: Neither.

There’s no point adding support for these clipboard formats. You’d be interoperating with programs that nobody uses any more.

I asked why the customer was interested in these data formats in particular. After all, there are thousands of data formats out there. Why are they so interested in learning about DIF and SYLK? The customer seems to be running around looking for things, finding out what they are, and then deciding whether those things will help their program.

I can understand reaching DIF when starting with the requirement to support interoperability with VisiCalc: “We need to interoperate with VisiCalc. What data format does it use? Oh, DIF, thanks.”

But starting with DIF and asking what it is used for is going about things backward. Start with product requirements, and then identify the things that will help you achieve those requirements. “Will the DIF data format help us achieve the goal of X?” is a reasonable question. But “Tell me about the DIF data format” is an open-ended question that takes a lot of time to research, and it’s pointless to make someone do all that research only to say, “Oh, then I’m not interested.”

Its like saying, “The documentation says that if I have a document written in the Hittite language, I can tag it with CF_HITTITE. Where can I find documentation on the Hittite language?”

Why are you writing a document in Hittite? The last native speaker of Hittite died over 3000 years ago. There may be some academic scholars who can read Hittite, but if your intent is to communicate with those scholars, you probably should use a language they are more fluent in. If you’re going to send the document to, say, the Cuneiform Studies department at the University of Chicago, then you probably want to write your document in English.

What is your use case that led you to want to add DIF support? Do you have any customers who need DIF support? The last native speaker of DIF died in 1983.

Topics

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

16 comments

Discussion is closed. Login to edit/delete existing comments.

Sort by :
  • Ian Boyd

    One reason to support DIFF and SYLK is because i want to be a good developer and pay my programmer taxes.

    If i’m trying to make data available to other applications through an `IDataObject`, and i already support:

    – HTML
    – Text
    – Unicode Text
    – PNG
    – Bitmap handle

    If it’s trival enough for me to include other formats that might help out another application: i’d like to do that:

    – CSV
    – Diff
    – Sylk
    – FileDescriptor
    – FileContents
    – RenPrivateAppointment
    – Gif
    – Jfif

  • John Styles

    I used to like DIF files. I was a bit sad when CSV files displaced them as the lowest common denominator for this sort of data interchange.
    I seem to recall that the slightly weird format was so that it would work with the file IO limitations of some very primitive versions of BASIC (specifically if I recall correctly they would get upset if you were expecting a string delimited by “” and got a number or vice versa).

  • John Styles

    Amusingly
    a) Sylk is also the brand name of a product you may not want to search for
    b) within living memory (well into the 2010s though not in Office 365 ProPlus which is what I’m using) having a CSV file (with the CSV suffix) beginning ID, in the first line would give you a weird message about SYLK files.

  • Neil Rashbrook

    Again, not the clipboard format, but for a project at a company that I used to work for, we needed to be able to generate a file that would automatically open in Excel for the user. As I recall, CSV wasn’t quite automatic enough to keep the user happy, so we ended up creating the file in (I think) SYLK format.