As part of a Java project (a while ago), I studied the RTF format, partly by reading the spec, and partly through reverse engineering - by creating multiple incrementally larger RTF docs, starting from zero content, then adding a word, then a font style, then a paragraph, a table, etc. And after each addition, opened the RTF in a hex editor and viewed the content, to help decipher the format rules. Then wrote a small RTF generation library in Java, that we used in the project to programmatically generate reports from DB data fetched via EJB. I also provided some ability to vary content and style independently. Good fun.
RTF is to Word like CSV is to Excel. In fact, we generated RTF because the output was to be input to Adobe InDesign.
Unfortunately, it's not an open standard AFAICT.
[0] https://interoperability.blob.core.windows.net/files/Archive...