首页 > 其他分享 >ABAP-OLE复制行和复制SHEET

ABAP-OLE复制行和复制SHEET

时间:2022-08-31 15:45:04浏览次数:64  
标签:sheet lc range lv ABAP 复制 CALL SHEET METHOD

 1 DATA lc_range TYPE ole2_object.
 2 DATA lv_sheet TYPE ole2_object.
 3 DO 2 TIMES.
 4   CALL METHOD OF lv_sheet 'Rows' = lc_range
 5     EXPORTING #1 = 7.
 6   CALL METHOD OF lc_range 'Copy'.  "COPY第6行插入一个新行
 7   CALL METHOD OF lv_sheet 'Rows' = lc_range
 8     EXPORTING #1 = 7 .
 9   CALL METHOD OF lc_range 'Insert'.
10   CALL METHOD OF lc_range 'ClearContents'. "是否需要清空Cell
11 
12 ENDDO .
13 
14 CALL METHOD OF lv_sheet 'copy'
15   EXPORTING
16     #1 = lv_sheet.
17 
18 SET PROPERTY OF lv_sheet 'name' = 'hhh'.
19 CALL METHOD OF lv_sheet 'ACTIVATE'.

标签:sheet,lc,range,lv,ABAP,复制,CALL,SHEET,METHOD
From: https://www.cnblogs.com/TigerMan/p/16643325.html

相关文章