Skip to Content
Former Member
May 07, 2013 at 09:35 AM

cell merging using sap automation object excel


Hi ,

I am using SAP automation object in order to manipulate an excel template stored in business document object service (OAER). In principle everything is working as I supposed. I am able to manipulate cell contents from the template by replacing some link references with SAP infos. I am also able to add entire new sections by using several methods of i_oi_spreadsheet class interface.

The problem I'm facing is now related to the possibility to "select" a range of excel columns and merge them in a single column.

here an example of what I would like to obtain

Please note this "table" cannot be predefined and stored in the template because this contains unpredictable number of items. So I must create it in the runtime by using "insert range" and "insert single table" methods. Afterwards I would like con condense the first row of this table (the header) as a single column.

Is there a way to achieve it? Does someone have a sample coding in case it was possible?

Thanks in advance


Header Col 1 row1 Col2 row1 Col3 row1 Col 1 row2 Col 2 row 2 Col3 row2 Col1 row3 Col2 row 3 Col3 row 3