首页 > 解决方案 > How to read an .xlsx file stored in the application server into an ABAP internal table?

问题描述

I have an Excel (.xlsx) file stored in a known path in AL11 which consists of, let's say, 20 columns and 51 rows of data (one of those rows is the column description which is already known to me because it is fixed and therefore can be ignored). I have created a program with the purpose of reading that Excel file and transferring the data into an internal table.

In a similar case in which the file was stored on local computer, I had used the function module ALSM_EXCEL_TO_INTERNAL_TABLE which worked fine, but I do not think it is the appropriate way to use now that the file is stored in the application server.

A colleague of mine suggested using OPEN DATASET statement, but in the past I have only used that statement for reading .txt format files and I do not know whether it can be used for .xlsx files as well or not. Do you have any suggestions? Thanks in advance.

标签: excelfileabapapplication-serverinternal-tables

解决方案


您可以使用abap2xlsx包进行 Excel 导入/导出操作。它有很多特点。

如果您正在寻找最小的阅读器,您可以查看我的xlsxreader

你可以在ABAP Open Source Projects看到很多有用的包/工具。


推荐阅读