2019 Oct 25 7:47 AM
When I use DOI I_OI_SPREADSHEET->SET_RANGES_DATA to put datas to an excel template, excel formula is covered.
I want retain excel formula if zhe ranges have not data. how can i do ? Somebody can help me? Thanks
I use OAOR to upload excel template.
2019 Oct 25 9:46 AM
I guess DOI handles only simple text.
As a workaround, you may directly issue OLE statements on the DOI control, by retrieving its OLE handle.
Example:
DATA doi_control TYPE REF TO I_OI_CONTAINER_CONTROL.
c_oi_container_control_creator=>get_container_control(
IMPORTING
control = doi_control ).
DATA(doi_handle) = doi_control->get_control_handle( ). " type CNTL_HANDLE in type pool CNTL
DATA(ole_handle) = doi_handle-obj. " type OBJ_RECORD
CALL METHOD OF ole_handle 'method' ...
More information on CALL METHOD OF, SET PROPERTY, etc.: ABAP documentation of OLE statements
Now, what you have to do is to ask in Microsoft forums what are the methods and properties to access the formulas. You may try by yourself using the VBA editor in Excel.