I have a wxGrid full of text that I would like to 'export' to a MS Word table.
So far I have considered the following:
- Generate HTML and save as a file. This is relatively simple but inconvenient because for the user it means opening a HTML file (which Word might not do automatically) before cutting / pasting into a document;
Generate HTML and copy to clipboard. More user friendly, user can just paste into their document but not sure if the formatting will copy across well. When I look at what Word puts on the clipboard when you copy a table in HTML, its frightening
As above but use RTF instead of HTML. I think this is more or less a non-starter as RTF seems inherently much more complicated and the helper libraries are all but defunct;
Use wxAutomationObject. I think this has the most promise, of course it is not cross-platform and wouldn't work with say LibreOffice, but at the moment neither of these are in my primary requirements list. The problem with this approach is that there seems to be a lack of information about using wxAutomationObject in any detail (I have looked at the one in the /samples directory. All the C++ examples I can find seem to be for C++ builder which has its own API.
My requirements for this are not too difficult, just a straightforward table with thin borders and using "Table Heading" and "Table Content" styles.