Excel worksheet reading from SAP application server
Excel worksheet reading from SAP application server will not work, file should be either .xml based excel file or .csv based excel or .dat type excel file to be read from application server
Normal Excel-File reading from the application server is not possible because, the Excel format before Office 2007 where a binary format (Suffix: .xls). The newer Office file format (Suffix: xlsx) is a zipped XML Format. To read the binary Excel-Format you need an OLE Connection between SAP GUI and MS: Office. But at the application server in background you doesn’t have this OLE Connection.
Usually the payment details through third parties are returned as Excel files and getting stored in Server location. So reading of these excel file is required for storing the details in SAP tables.
There are many possible solutions. We have evaluated 3 solutions for our purpose as it’s difficult to track presentation layer files each time. So reading from Server location is easier.
1) Upload the files from the presentation server in foreground. There are some function modules in the standard which can read the xls format.
2) Write an Excel-macro based solution which converts all Excel Files in the CSV-Format so that the same could be read from applications server directly.
3) Creating a temporary excel file in presentation server based on the application server file using Sap function module :ARCHIVFILE_SERVER_TO_CLIENT,
and reading it as normal presentation server- excel file and storing in the data in SAP table and deleting the temp file in the end.