Skip to Content

How to use DOI retain excel formula

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 25, 2019 at 08: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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.