I need to read excel files via SAPGUI (not in batch, not from server). Only one sheet/file, not a csv file.
I am aware of a few function modules that do that, but they are restricted to cell sizes of 32 or 40 or 50 characters per cell.
Are there function modules or classes/methods that allow me to read excel files with longer cells? Longer means: either String or defined by the caller or at least 80.
Edit
I used ALSM_EXCEL_TO_INTERNAL_TABLE successfully in other projects where cell size is not that important. This module reads into a structure ALSMEX_TABLINE that restricts data to 50 characters.
KCD_EXCEL_OLE_TO_INT_CONVERT reads into a table with 32 characters / cell.
You are right, function module 'ALSM_EXCEL_TO_INTERNAL_TABLE' can manage only 50 characters. In this, one standard alternative is to use function module 'GUI_UPLOAD', which I have used, but in this case you must convert the excel file to a cvs file, which is not what you really want.
The other alternative, according to this link, is to create a copy of 'ALSM_EXCEL_TO_INTERNAL_TABLE' and then create a copy of the structure 'ALSMEX_TABLINE'.
The structure field 'VALUE' of the new structure must be changed to the length you need and then the copy of 'ALSM_EXCEL_TO_INTERNAL_TABLE' would use the new structure of 'ALSMEX_TABLINE'.
I haven't tried this solution but maybe could work for you.
Hope it helps.
You can use
FILE_READ_AND_CONVERT_SAP_DATA
for that aim. Its output table cell is limited to 256 characters, which would be quite sufficient for you. Code sample is given below: