1

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

Cœur
  • 37,241
  • 25
  • 195
  • 267
zac
  • 4,495
  • 15
  • 62
  • 127

2 Answers2

3

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.

BKeeney Software
  • 1,299
  • 6
  • 8
  • thanks yes I work with text and images only but text is formatted - can I use "open office" word class like MS Word ? thanks – zac Jul 31 '10 at 20:14
0

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)

Aleksandr M
  • 24,264
  • 12
  • 69
  • 143