开发者

how to export data from realbasic to open office word file or compatible software

I use real basic for programming and I want to export some data to a开发者_JAVA百科 word file that can be opened with "Open Office" or any other word processing software that can work on MAC OSX, any advise?


You didn't indicate what sort of data you're dealing with so I'll just assume text. Take a look at the StyledText class since it can read/write RTF which can be read by most word processors. http://docs.realsoftware.com/index.php/StyledText The drawback is that they only support a subset of RTF and don't support images.

If you have images and want a little more control I would recommend the Formatted Text Control from True North Software. http://www.truenorthsoftware.com/formattedtextcontrol/ It's a little pricey, but it's well worth it. True RTF support as well as a lot of XML options. You can create a very nice looking export via code.

You can always just create a plain old text file using the TextOutputStream which any word processor can open and read. http://docs.realsoftware.com/index.php/TextOutputStream

If you're on Windows, you can export directly to Word using the WordApplication class. http://docs.realsoftware.com/index.php/WordApplication That's not a cross-platform solution though.


TextOutputStream in itself only outputs characters, but if the text is rtfdata and you give it a fileending of .rtf it is interpreted as an RTF-file. You can actually give the file a .doc, and it will be opended in Word as default (assuming word is default for .doc files)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜