excel - 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.
解决方案
您可以使用abap2xlsx包进行 Excel 导入/导出操作。它有很多特点。
如果您正在寻找最小的阅读器,您可以查看我的xlsxreader
你可以在ABAP Open Source Projects看到很多有用的包/工具。
推荐阅读
- visual-studio-2019 - 我在解码更新 NuGet 包时出错时发现无效数据
- scala - 优化猫库“<*>”
- kubernetes - Kubernetes 获取已完成工作的事件
- sql - 传入多个 Id 以返回 case 语句中的列
- laravel - 为什么我的 request->image 是字符串而不是二进制?
- c# - 如何使用机器人框架(Echobot,使用 ITurnContext)进行单元测试设置
- php - 如何在 curl 中处理重定向
- spring - Kafka Consumer 和 Spark-Kafka-Consumer 的区别
- javascript - 无法迭代 js 对象以将它们设置在不同 div 标签中的每个对象的组中
- wix - 共享属性:“错误 LGHT0094:未解决的符号引用”