Looking at the various demo programs that SAP has provided, I found one that seems to meet my needs. This program (saprdemo_tables_in_excel) allows you to load data from internal tables into a worksheet (shown in-place in the program's screen) and also allows the program to extract the data from the worksheet so that the internal tables can be updated. This program makes use of Desktop Office Integration and is quite easy to follow and understand.
I've created my own program based on the SAP program and have been able to develop it so that it meets my needs. However, there is one requirement (probably the main requirement) that I've found I can't satisfy.
I need some of the cells to have the "Wrap Text" option enabled but cannot see how to do that. None of the methods from the I_OI_SPREADSHEET interface allow me to change this. There are methods that allow me to change the font size and color and background color, as well as properties such as Bold, Italic and Justified, but nothing that relates to the Wrap Text option.
I've been able to find information that seems to indicate that the Wrap Text property can be set if the program was written around OLE2 objects such as with the following code:
However, since I am using the I_OI_SPREADSHEET interface, I'm struggling to see how I can make use of this approach. Is there some way that I can set the Wrap Text property of a cell in my program given that it is based around the saprdemo_tables_in_excel program?
Dig Deeper on SAP development and programming languages
Related Q&A from Matthew Billingham
A SearchSAP.com reader who is writing a program to update SAP tables wants to know how to make updates visible in a change log by using an SAP change... Continue Reading
Find out how to correct an SAP ABAP dump with an oversize condition to avoid an SAP ABAP dump giving an DBIF_RSQL_ INVALID_RSQL error at the SQL ... Continue Reading
Learn how to create a function group and authorization group using an SAP ABAP table maintenance generator on a Z table. Continue Reading