HI ,
I am doing project, which involve populating data in Excel file.
For the same, I am using SAP OLE .
Now, I struck when I am trying to copy format of a row to the given range.
Details of problem is as follows :-
In macro , the VBScript for the above operation is :-
Rows("15:15").SelectSelection.Copy
Rows("13:14").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
So I tried to translate the same in ABAP as below :-
*Rows("15:15").Select
CALL METHOD OF
g_active_sheet
'ROWS' = v_source_obj
EXPORTING
#1 = p_source
#2 = p_source.
CALL METHOD OF
v_source_obj
'SELECT'.
* selection.copy
CALL METHOD OF
g_excel_application
'SELECTION' = v_selection_obj.
CALL METHOD OF
v_selection_obj
'COPY'.
* rows("13:14").Select
CALL METHOD OF
g_active_sheet
'ROWS' = v_range_obj
EXPORTING
#1 = p_from
#2 = p_to.
CALL METHOD OF
v_range_obj
'SELECT'.
CALL METHOD OF
v_selection_obj
'PASTESPECIAL'
EXPORTING
#1 = 'paste:=xlpasteformats'
#2 = -4142
#3 = 0
#4 = 0.
Please suggest what wrong I am doing here.
Regards,
Ekam