In the meantime I looked into the file formats which Excel and LibreOffice write to the clipboard: They just stream standard files containing only the selected cells to the clipboard. The problem, however, is to find the correct names for registering the clipboard formats. As expected, there is some inconsitency between Windows and Linux, even with LibreOffice which runs in both operating systems.
The current trunk version of fpspreadsheet now supports clipboard operations in Windows rather well. Copying and pasting of data to cells in the same worksheet, a different worksheet, a subsequentyl loaded workbook, or even to an external application (Excel, LibreOffice) works fine. The project "fpsctrls" in the fpspreadsheet installation provides a worked-out example.
In Linux, however, there is still some kind of mystery to me. My observation with my "ClipboardExplorer" (
https://sourceforge.net/p/wp-laz/code/HEAD/tree/ClipboardExplorer/) is that all the written streams, in fact, are found in the Linux clipboard, but the "Insert special" menu command of LibreOffice sometimes is grayed-out. Pressing Ctrl-V does insert data into LibreOffice, but only once, there is an error message "no valid clipboard data" (or similar) afterwards. Sometimes the "Insert special" is available, but it contains only the items "unformatted text", "html" and "*". The latter one probably should be the OpenDocument format written by fpspreadsheet which I gave the mime-type "application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)" (that's the name LibreOffice uses when it copies data to the clipboard). Selecting the "*" item results in above error message saying that LibreOffice does not understand this format.
Does anybody out there have some experience with the clipboard in Linux and with Libre/OpenOffice? Any idea what I am doing wrong?