끄적이는 프로그래밍/SAS 프로그래밍

SAS로 RTF 파일 출력하기 2

요맘때10 2022. 5. 6. 09:00
반응형

이전 포스팅을 먼저 보고 오려면 아래 링크 Click

2022.05.04 - [끄적이는 통계분석/SAS] - SAS로 RTF 파일 출력하기 1

 

SAS로 RTF 파일 출력하기 1

기본 형태 ods listing close; options nodate nonumber orientation=portrait; ods rtf file="출력파일경로\출력파일명.RTF"; procedure or ods text ... ods rtf close; ods listing; 기본 형태의 틀에 하나씩 추가하면 된다. 만약 가로

youivab.tistory.com

반응형

4. TOC (Table of Contents) 생성

여러 방법이 있지만, 원하는 부분에 직접 TC를 지정하여 표 목록을 생성 가능하다는 면에서 이 방법을 사용한다.

ods listing close;
options nodate nonumber orientation=portrait; 
ods rtf file="Z:\출력파일명.RTF" wordstyle="{\s1 Heading 1;}";

ods escapechar = "^";

Title1      "제목 1";
Title2      "제목 2";

Footnote1 "주석 1";
Footnote2 "주석 2";


ods rtf text="^S={color=black font_size=10pt font_weight=bold}{\s1\tc Hello world 1}";
ods rtf text="^S={color=green font_size=12pt font_weight=medium}{\s1\tc Hello world 2}";
ods rtf text="^S={color=red font_size=14pt font_weight=medium}{\s1\tc Hello world 3}";

ods rtf text="^S={just=c} {\fs24\qc Table of contents} {\field{\f3\*\fldinst {\\TOC \\f \\h}}}";

ods rtf close;
ods listing;

 

여기서 Ctrl+a, F9를 순차적으로 입력하면

5. TOC (Table of Contents)에 탐색창 제목 표시하기

ods listing close;
options nodate nonumber orientation=portrait; 
ods rtf file="Z:\출력파일명.RTF" wordstyle="{\s1 Heading 1;}";

ods escapechar = "^";

Title1      "제목 1";
Title2      "제목 2";

Footnote1 "주석 1";
Footnote2 "주석 2";


ods rtf text="^S={color=black font_size=10pt font_weight=bold}{\pard\s1\tc Hello world 1\par}";
ods rtf text="^S={color=green font_size=12pt font_weight=medium}{\pard\s1\tc Hello world 2\par}";
ods rtf text="^S={color=red font_size=14pt font_weight=medium}{\pard\s1\tc Hello world 3\par}";

ods rtf text="^S={just=c} {\fs24\qc Table of contents} {\field{\f3\*\fldinst {\\TOC \\f \\h}}}";

ods rtf close;
ods listing;

 

반응형