2023 Feb 06 5:58 PM
I have an excel worksheet, which needs to be updated with a new worksheet to be added.
How can I achieve this using Ole2object?
I am able to open the excel sheet but unable to add a new worksheet to it.
I can use abap2xlsx but the process to get it moved to prod needs approval and would take time. so avoiding for now.
CREATE OBJECT gra_excel 'EXCEL.APPLICATION'.
CALL METHOD OF gra_excel 'Workbooks' = gra_workbooks.
SET PROPERTY OF gra_excel 'Visible' = 1.
CALL METHOD OF gra_workbooks 'OPEN'
EXPORTING
#1 = filep.
after this I am able to access other worksheets in the same excel but unable to add new worksheets.
2023 Feb 06 7:55 PM
In Excel, you have a macro recorder. Record the creation of a worksheet and in the recorded VBA, you will get the property and method to be used (and parameter).
2023 Feb 06 7:55 PM
In Excel, you have a macro recorder. Record the creation of a worksheet and in the recorded VBA, you will get the property and method to be used (and parameter).
2023 Feb 07 10:29 AM
2023 Feb 06 8:19 PM