Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in Excel with OLE

Former Member
0 Likes
486

Hello,

i´m downloading some data into excel with Ole way. I need to write data in some differents sheets. Do anyone knows how to active other sheet than the first one?

Thank you.

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
455

Hello,

i´m downloading some data into excel with Ole way. I need to write data in some differents sheets. Do anyone knows how to active other sheet than the first one?

Thank you.

2 REPLIES 2
Read only

former_member156446
Active Contributor
0 Likes
456

Read only

Former Member
0 Likes
455

Try with this.

CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .

SET PROPERTY OF gs_excel 'Visible' = 1 .

GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooklist .

GET PROPERTY OF gs_wbooklist 'Application' = gs_application .

SET PROPERTY OF gs_application 'SheetsInNewWorkbook' = 1 .

CALL METHOD OF gs_wbooklist 'Add' = gs_wbook .

GET PROPERTY OF gs_application 'ActiveSheet' = gs_activesheet .

SET PROPERTY OF gs_activesheet 'Name' = gv_sheet_name .