The SAS Output Delivery System and reporting techniques

ODS RTF file, numbers split into other lines when opened with .doc

Reply
N/A
Posts: 0

ODS RTF file, numbers split into other lines when opened with .doc

Hi,

I've created an RTF file in UNIX environment.
If I open the RTF file with .doc, some of the numbers are split into other rows:
example, 35.4 (2.356
)
Its fine when I open with RTF.

I'd be grateful if anyone has a solution.

Thank you
SAS Super FREQ
Posts: 8,864

Re: ODS RTF file, numbers split into other lines when opened with .doc

Posted in reply to deleted_user
Hi:
I don't understand what you mean when you say "when I open the file with .doc" versus "open with RTF".

.DOC and .RTF are both file extenstions -- for example, I can open a .DOC file created with Word on Windows on my daughter's Macintosh computer, using Word. I can also open a .RTF file created with SAS on my daughter's Mac, using ClarisWorks or Pages. I can open an .RTF file with OpenOffice.

.DOC is not a word processing application. Word processing applications are applications like Microsoft Word, Corell WordPerfect, NisusWriter, Claris Works, StarOffice, OpenOffice.

If you use ODS in this fashion:
[pre]
ods rtf file='somefile.doc';

versus

ods rtf file='somefile.rtf';
[/pre]

Then you are "fooling" your word processor software with the first example -- calling an RTF file with a reserved Microsoft Word file extension like .DOC or .DOCX might be OK in Microsoft Word, but might cause issues in other word processor applications that are looking for Microsoft specific .DOC controls in the file. If you use the second invocation method and use a file extension of .RTF, on the other hand, any word processing application that knows how to interpret RTF control strings could, within the limits of how the application works, render those RTF control strings correctly in the word processing application.

The underlying premise of an RTF file is that you will probably edit or change it in the word processing application. I would suggest that 1) you use RTF as the correct file extension with ODS RTF and 2) open the file in your word processing application of choice and 3) adjust the margins in the word processing application until the cells no longer wrap and then 4) use a SAS options statement to apply those margins to your SAS job so the table will be formatted using those margins.

cynthia
N/A
Posts: 0

Re: ODS RTF file, numbers split into other lines when opened with .doc

Posted in reply to Cynthia_sas
Thanks Cynthia,

I've used ODS FILENAME='ccccccccccc.rtf'.

The rtf file is generated in a folder.
When I open the file by double clicking on the file, everything is ok.
When I open with word, some of the cell's are split, as explained before.

Hope there's a solution to this.
SAS Super FREQ
Posts: 8,864

Re: ODS RTF file, numbers split into other lines when opened with .doc

Posted in reply to deleted_user
Hi:
Still not enough information. What application is opening when you double click? Word? If so, there should be no difference between how the file is rendered in Word whether you double click or whether you do a File--> Open from inside Word.

In some earlier versions of SAS and RTF, (like back in Version 8), I remember that there was an issue where if you already had Word opened and you have modified the Word template normal.dot, it might have been possible for the existing Word template margins to be used with your SAS RTF file -- but that was long, long ago and I haven't seen that behavior anymore.

On what operating system are you double clicking??? On Unix? If so, what application is launching? I can't think of any solution other than explicitly setting the margins for RTF in a SAS OPTIONS statement. Otherwise, you might wish to open a track with Tech Support to see whether they have any additional insights.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 458 views
  • 0 likes
  • 2 in conversation