ABAP OLE
OLE
DATA: excel TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
cell TYPE ole2_object. FORM frm_open_excel USING p_fullpath.
CREATE OBJECT excel 'EXCEL.APPLICATION'.
SET PROPERTY OF excel 'Visible' = .
CALL METHOD OF excel 'Workbooks' = workbook.
CALL METHOD OF workbook 'Open'
EXPORTING
# = p_fullpath.
CALL METHOD OF excel 'Sheets' = sheet
EXPORTING
# = .
CALL METHOD OF sheet 'Activate'.
ENDFORM. FORM frm_close_excel .
GET PROPERTY OF excel 'ActiveWorkbook' = workbook.
CALL METHOD OF workbook 'SAVE'.
CALL METHOD OF excel 'QUIT'.
FREE OBJECT sheet.
FREE OBJECT workbook.
FREE OBJECT excel.
ENDFORM. FORM frm_fill_cell USING p_row
p_col
p_value.
CALL METHOD OF excel 'CELLS' = cell
EXPORTING
# = p_row
# = p_col.
SET PROPERTY OF cell 'VALUE' = p_value.
ENDFORM. FORM frm_clipboard_to_excel USING p_sheet
p_row
p_col.
DATA: l_range TYPE ole2_object,
l_cell TYPE ole2_object. CALL METHOD OF p_sheet 'Cells' = l_cell
EXPORTING # = p_row # = p_col. CALL METHOD OF p_sheet 'Range' = l_range
EXPORTING # = l_cell # = l_cell. CALL METHOD OF l_range 'SELECT'.
CALL METHOD OF p_sheet 'PASTE'. FREE OBJECT: l_range, l_cell.
ENDFORM. FORM delete_columns USING colnum.
CALL METHOD OF application 'COLUMNS' = columns
EXPORTING # = colnum.
CALL METHOD OF columns 'DELETE'.
ENDFORM. FORM delete_row USING i_row.
CALL METHOD OF application 'ROWS' = rows
EXPORTING # = i_row.
CALL METHOD OF rows 'DELETE'.
ENDFORM. CALL METHOD cl_gui_frontend_services=>file_save_dialog
CALL FUNCTION 'DOWNLOAD_WEB_OBJECT'
CLASS cl_abap_char_utilities DEFINITION LOAD.
l_separator = cl_abap_char_utilities=>horizontal_tab.
CALL METHOD cl_gui_frontend_services=>clipboard_export
ABAP OLE的更多相关文章
- ABAP OLE常用方法和属性
转自 http://www.cnblogs.com/eric0701/p/5213694.htmlSAP EXCEL OLE常用方法和属性 附加网上找到的比较好的源代码示例一份 1.ole中如何保存和 ...
- ABAP ole操作1
转自:https://www.cnblogs.com/jxzhu/p/8708686.html OLE整理: 1.定义,分别对应EXCEL,workbook(工作簿),sheet(页),单元格 DAT ...
- ABAP ole操作
1.ole 如何保存和退出call method of sheetname 'saves' exporting #1 = filepath #2 = 1. call method of applica ...
- 2018.04.03 ABAP OLE操作整理
OLE整理: 1.定义,分别对应EXCEL,workbook(工作簿),sheet(页),单元格 DATA: EXCEL_OBJ TYPE OLE2_OBJECT, BOOK_OBJ TYPE OLE ...
- ABAP ole方式对EXCEL进行操作
DATA: excel TYPE ole2_object, workbook TYPE ole2_object, sheet TYPE ole2_object, ...
- 【学习】ABAP OLE 对EXCEL的处理
原文:http://blog.sina.com.cn/s/blog_7229b9c00100opx2.html -------------------------------------------- ...
- ABAP使用OLE2对象创建EXCEL文件
厌倦了总是下载一模一样的EXCEL文档?没有颜色,边框,有效性验证.... 让我们看看怎样用OLE2对象来创造可爱的EXCEL工作表吧!(效果如下) 首先你需要知道微软EXCEL中的不同部分的名称,每 ...
- [SAP ABAP开发技术总结]OLE
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- ABAP excel操作 OLE 常用方法和属性
转自 http://bstone.blog.163.com/blog/static/176820446201172834149199/#userconsent# OLE 常用方法和属性 1.ole中如 ...
随机推荐
- BZOJ4873 LuoguP3749 寿司餐厅
题面太长,请诸位自行品尝—>寿司餐厅 分析: 首先题目中给了限制条件,假如选了D(i,j)(i<j),那么也就选了D(i+1,j)和D(i,j-1)两个点. 于是我们一下就明白了,哦,最大 ...
- tcp案例之文件下载器
文件下载器客户端 import socket def main(): # 1.创建一个tcp socket tcp_client_socket=socket.socket(socket.AF_INET ...
- vue中的表单验证
http://www.cnblogs.com/luoxuemei/p/9295506.html /*是否合法IP地址*/ export function validateIP(rule, value, ...
- 集训第四周(高效算法设计)J题 (中途相遇法)
Description The SUM problem can be formulated as follows: given four lists A, B, C, D<tex2html_ ...
- UVA - 10976 分数拆分
题意: 给定正整数k(1<=k <= 10000),找出所有正整数 x>= y, 使得1/k = 1/x + 1/y 分析: 因为 x >= y 所以 1/x <= 1/ ...
- MySQL MGR源码分析2 - 从start group_replication看MGR代码框架
此文已由作者温正湖授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 上一篇我们从方案层面讲解了MGR的成员管理和故障恢复.本篇从源码层面捋一捋,通过本篇介绍,除了能够了解如何将 ...
- Qt——信号与槽用法总结(未完待续)
1.设计模式中信号与槽编辑选项卡 2.右键组件,转到槽,写函数 void LoginDialog::on_loginBtn_clicked() { accept(); } 3.信号与槽编辑模式 按下F ...
- Codeforces Round #259 (Div. 2) D
D. Little Pony and Harmony Chest time limit per test 4 seconds memory limit per test 256 megabytes i ...
- Linux下汇编语言学习笔记43 ---
这是17年暑假学习Linux汇编语言的笔记记录,参考书目为清华大学出版社 Jeff Duntemann著 梁晓辉译<汇编语言基于Linux环境>的书,喜欢看原版书的同学可以看<Ass ...
- POJ 2456_Aggressive cows
题意: 给定N个位置,把C头牛分别放入,求相邻两头牛的最大距离. 分析: 即为求两头牛之间最小距离的最大值.二分搜索答案. 代码: #include<iostream> #include& ...