Skip to Content
avatar image
Former Member

DOI and Excel


I have been searching for information on Desktop Office Integration and Excel specifically and found nothing on my problem. I am relatively new to ABAP.

I have a FM that returns a table full of paragraphs (with a line number and text line of 255 characters to denote the text in the paragraph). That's fine, the problem comes on extracting these multiple lines of text to Excel. The soi_generic_item type declares a row(4), column(4)and value(255). Now this value(255) is the limiting factor. I can write out 255 characters of text, but cannot join multiple lines together as they are truncated.

<i> lt_val type soi_generic_table,

lf_val type soi_generic_item.

loop at gt_txt into gf_txt.

case gf_txt-linno.

when 1.

lf_val-value = gf_txt-txtln.

when others.

concatenate lf_val-value

' '


into lf_val-value.


append lf_val to lt_val.


If there is 1 line it is ok. If there are multiple lines (field LINNO for example could be line 15) then yes it appends, but as "lf_val-value" is 255 characters, it will get truncated and displays in Excel only the first 255 characters.

The export parameter contents is of type soi_generic_table, comprised of soi_generic_item.

<i> call method hnd_excel_sheet->set_ranges_data


ranges = lt_rng

contents = lt_val

updating = -1

no_flush = 'X'


error = o_error

retcode = gs_rcode.</i>

I would like to be able to output to Excel approximately 3000 characters.

Is there a limit on the number of chars Excel can receive? In this case, it looks like 255.

I am writing out other types of data to other cells, such as dates and numerics. This all works ok.

Any pointers would be gladly appreciated.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 25, 2006 at 03:02 PM
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      I have the first PDF and used that in the first instance to figure out what I needed. Yes there is an Important Considerations section under the Spreadsheet interface, which mentions soi_generic_table and value being 256.

      As for the 2nd PDF that is OLE and from what I gathered before, that would mean I would have to close the spreadsheet interface, reopen using the OLE methods and populate Excel. This to me would seem a bit daft to do this. I understand from another post that someone said it works in OLE, but not using the DOI.

      The spreadsheet is a pre formatted 10 worksheet spreadsheet, I have managed to populate 3 of them and have data being exported, I am just stuck on this one.



  • avatar image
    Former Member
    Apr 25, 2006 at 03:08 PM

    Hi Nick,

    Please end me ur email address i will send u PDF for Dekstop Intergration which covers every thing.

    Sure it will help u

    Mark Helpfull answers ( Rewards Points )



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nick,

      Can you please explain me how you have uploaded, because i am facing same problem?

      Cell is having below mentioned data:

      "The programme design was accepted by the NS and fully funded by donors.

      Delegation OD team were generally very competent. Many NS counterparts were

      excellent though some were less effective and required coaching. Projects were

      generally achieved according to plan and budget, though external factors and

      the NS context meant that some of the original plans had to be amended. The

      external programme evaluation was completed satisfactorily and yielded useful

      results both for Serbia Montenegro and for the Federation generally"

      If possible please send code?

      -Rajneesh Gupta

      Edited by: Rajneesh Gupta on Jul 31, 2009 12:40 PM

      Edited by: Rajneesh Gupta on Jul 31, 2009 12:40 PM