# ALSM_EXCEL_TO_INTERNAL_TABLE — Read Excel File into Internal Table by Cell

> Opens an Excel file on the user's PC through OLE and reads the cells in the given row/column range into an internal table as row, column and value. Upload programs commonly use it to read Excel templates directly. Excel must be installed on the PC and an SAP GUI connection is required; each cell value is limited to 50 characters, so move the result into your own structure by row and column number.

- Modules: BASIS
- Type: Function module
- Function group: ALSMEX
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/alsm-excel-to-internal-table/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| FILENAME | RLGRAP-FILENAME | File name | Yes |
| I_BEGIN_COL | I | Start column | Yes |
| I_BEGIN_ROW | I | Start row | Yes |
| I_END_COL | I | End column | Yes |
| I_END_ROW | I | End row | Yes |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| INTERN | ALSMEX_TABLINE | Cell values (row, column, value) | Yes |

## Exceptions

- INCONSISTENT_PARAMETERS: Inconsistent parameters
- UPLOAD_OLE: OLE upload error

## Call template (ABAP)

```abap
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
  EXPORTING
    filename = lv_filename
    i_begin_col = lv_i_begin_col
    i_begin_row = lv_i_begin_row
    i_end_col = lv_i_end_col
    i_end_row = lv_i_end_row
  TABLES
    intern = lt_intern
  EXCEPTIONS
    inconsistent_parameters = 1
    upload_ole = 2
    OTHERS = 3.
```


