First of all, what kind of template are you envisioning??? TABLE, STYLE or TAGSET or GRAPH templates. Since you are talking about rows and columns, I assume it is NOT a GRAPH template that you're asking about.
Second -- if it is a STYLE template, then what is your destination of choice and what do the 2 "lines" or report rows represent -- the last row of data and the summary line?? two lines or report rows of data??? And, what is your procedure of choice for producing this output using your style template?
If you are talking about a TABLE template, then are you using your TABLE template with a SAS procedure (and, if so, what procedure) or are you using your TABLE template with DATA _NULL_ programs.
And, speaking of DATA _NULL_ programs, could you be asking about the experiemtal DATA step interface to ODS??? (as described in this paper?) http://www2.sas.com/proceedings/sugi28/022-28.pdf
If you look on page 2 of that paper, the author explains that if you use the object oriented syntax that you are NOT using TABLE templates anymore.
Let's say that you had this table:
NAME AGE HEIGHT
Alan 16 72
Barb 15 63
Carl 16 70
OR this table:
NAME SAL BONUS
Alan 32,000 1,000
Barb 32,000 1,250
Total 64,000 2,250
When you say you want to "merge the two last lines of the last column", I have a hard time envisioning what you mean. Given that all cells are populated in the 3 lines and 3 columns, how/where/why would you merge the values in the table??? In the first table, we have a listing of people and their ages and heights--every cell is populated. In the second table, the first two rows are coming from the data and the third row is a total row -- again -- what is the merging of cells that you would do?
Could you explain in a bit more detail -- perhaps show the code that you're currently using to produce your output? And a small sample of what your data looks like and how you -hope- for it to look???