12-03-2009 6:24 PM
Hi Friends,
I need to paste the clipbord contents in a selected range of cells using ole automation.
Rage is selected using the following code :
CALL METHOD OF G_EXCEL 'Cells' = G_CELL1
EXPORTING #1 = 4
#2 = 1.
CALL METHOD OF G_EXCEL 'Cells' = G_CELL2
EXPORTING #1 = P_ROW
#2 = gv_col.
CALL METHOD OF G_EXCEL 'Range' = G_CELLRANGE
EXPORTING #1 = G_CELL1
#2 = G_CELL2.
now need to past the clipbord contents in G_CELLRANGE.
Would appriciate your help,
Thanks,
John
12-03-2009 6:28 PM
Check this simple and very understanding Blog by Rich: [Manipulate Excel with OLE & ABAP|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417100%29ID1618511350DB10403094249511349855End?blog=/pub/wlg/2341%3Fpage%3Dlast%26x-maxdepth%3D0]
12-03-2009 9:17 PM
Hi Friend,
I have gone through that blog before posting my query, it does not have the coding for Paste in selected range.
Thanks foe your help, i have checked th forum before posting this, as could not found any related one.
John
12-14-2009 6:17 PM
Hi John,
Use method PASTE as below:
CALL METHOD OF G_CELLRANGE 'PASTE'.
Regards,
Nisha Vengal.
12-03-2009 9:23 PM
Try like this, once your range has been selected.
CALL METHOD OF G_EXCEL 'Paste' .
Regards,
Naimesh Patel
12-04-2009 3:05 AM
Hi Jhon,
this is the obsolete old way even Rich would not recommend (look at the age of the blog).
There are far better and much more performat ways doing this using Desktop Office Integration.
Refer to this complete documentation of [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf]
It took me some time to create my first application with DOI, but if you have done you will never want to miss it.
Regards,
Clemens
12-04-2009 3:23 AM