Skip to Content
0
Former Member
Apr 02, 2008 at 06:55 AM

changing existing excel-file using SAP DOI

102 Views

I try to change data in an existing excel-sheet using SAP desktop office integration.

When changing several cells with method SET_RANGES_DATA of interface I_OI_SPREADSHEET all given cells do not get new values but get empty even if they had values before.

Since i didn't want to give every cell a range-name I used parameter RANGESDEF instead of RANGES as described in documentation:

      CLEAR empty[]. 
      CALL METHOD spreadsheet->set_ranges_data 
        EXPORTING 
          ranges    = empty[] 
          no_flush  = '' 
          updating  = 1 
          contents  = data_table[] 
          rangesdef = ranges[] 
        IMPORTING 
          error     = error 
          retcode   = ret_string.

Does anybody have any idea why the values in data_table are not filled in? I looked with debugger in the tables data_table and ranges an they looked good. Retcode sais "OK" after execution.

regards

Herbert