2010 Apr 30 8:02 PM
Colleagues:
A client wants to ftp an excel file directly to the SAP server. Is there a way to read a native excel file from the server? They want to avoid any manual intervention, so uploading from a PC is not an option.
Thanks.
Colleagues:
A client wants to ftp an excel file directly to the SAP server. Is there a way to read a native excel file from the server? They want to avoid any manual intervention, so uploading from a PC is not an option.
Thanks.
2010 Apr 30 11:28 PM
If the user runs a transaction in dialog, then you may use OLE2 (abap statements CREATE OBJECT, CALL METHOD OF, ...) Search SDN, discussed many times.
If it is read in background, this is a problem. You should connect a Windows server with Excel and make this server process the file.
2010 May 02 9:33 AM
Hi Ted,
It depends what you want to do with the file.
One way to read the file from the application server is to use OLE (as Sandra proposed) giving the excel application the URL of the transmitted file. But then of course you will need a presentation server running the program in dialog - i.e. a user. But using this method will give your program complete usage of the excel file.
If you actually want to read the file in background (this is what I understand) the only way to read the file is opening it in binary mode (OPEN DATASET ... BINARY MODE) and to read the file binary. Of course then you have to fight with MS's internal excel format, which I assume will not be much fun.
Can the sending system save the file in Excel as a CSV-file instead of a native Excel file (perhaps assisted by a little VB macro)? In this case you could read that file quite easily. If there is a chance I would go for that option.
Regards, Gerd
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |