Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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.




Helpful Answer

Not what you were looking for? View more on this topic or Ask a question