Merge cells vertically in RTF

I need to programmatically generate an RTF document with a table with vertical column join., Ex

______________________________
|  merged | foo    |  hello   |
|  cell   |        |          |
|  right  |--------|----------|
|  here   | bar    |  world   |
|_________|________|__________|

I looked online and found that the codes are \ clvmgf and \ clvmrg but I can’t find a decent example.

I made rtf text using MS word, but there are too many junk-rtf codes for me to figure out where to put \ clvmgf and \ clvmrg for this to work.

Can someone give me rtf for the above example table without extraneous rtf codes so that I can understand how \ clvmgf and \ clvmrg work?

Any further explanation would also be helpful.

Thank!

+3
source share
3 answers

, , WRITE.EXE . , , , .

0

RTF , :

{\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}}
\fs20\viewkind4\uc1

\trowd \clvmgf \cellx2972 \cellx6053 \cellx9134\pard\intbl merged cell right here\cell foo\cell hello\cell\row
\trowd \clvmrg \cellx2972 \cellx6053 \cellx9134\pard\intbl\cell bar\cell world\cell\row
\pard\par
}

Alex-K , .

+3

Source: https://habr.com/ru/post/1744360/


All Articles